How to install a new system from a usb key


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How to install a new system from a usb key
# 1  
Old 02-03-2009
Question How to install a new system from a usb key

Hi everybody,
I have several computers that are configured to install when I plug them on the network. The hard drive come's empty, but I think they have a parameter in the BIOS that allow the machines to install from the network.
My problem is that in most cases, available bw is weak and installation takes hours. I still have a dozen of computers to prepare and I would like to do the installations from a USB key.
I know very few about the system. Just that there's a server XPE somewhere that distributes an image of the system. But I could get a copy of that image. It's a file called system.tgz. If I unpack it, I just get the standard tree arborescence of a linux system :
./bin
./etc
./home
./root
./usr
...

My questions are:
1) Can I just use system.tgz on a USB key?
2) Do I need to get more file?
3) What do I have to configure?

Thanks for your help.
Santiago
# 2  
Old 02-03-2009
If system.tgz only contains directories and not the files, it's certainly not going to be enough, and you certainly can't boot it either, or extract it to a raw disk. You need to figure out what's doing the partitioning of the disks.

These machines are probably network-booting with PXE. PXE works by a DHCP server giving custom command-strings in their DHCP replies which tell the machines what files to download and run from what tftp server.

Last edited by Corona688; 02-03-2009 at 05:06 PM..
# 3  
Old 02-03-2009
Thanks for your reply Corona688.
What I wanted to mean with standard arborescence was actually:
The system.tgz contains the integrality of the filesystem.

Now that you are talking about tftp, here is what I found on the PXE server:
Code:
santiago$ ls -AlR tftpboot/
tftpboot/:
total 187844
drwxrws--x 3 root admins      4096 2009-01-23 17:35 debian-installer
-rw-rw-r-- 1 root admins     13480 2009-01-23 17:36 pxelinux.0
drwxrws--x 2 root admins      4096 2009-01-23 17:36 pxelinux.cfg

tftpboot/debian-installer:
total 4
drwxrws--x 2 root admins 4096 2009-01-23 17:36 i386

tftpboot/debian-installer/i386:
total 10280
-rw-rw-r-- 1 root admins 9280899 2009-01-23 17:36 initrd.gz
-rw-rw-r-- 1 root admins 1219068 2009-01-23 17:36 linux
-rw-rw-r-- 1 root admins      87 2009-01-23 17:36 ndtv.txt

tftpboot/pxelinux.cfg:
total 4
-rw-rw-r-- 1 root admins 821 2009-01-23 17:36 default

Is there any chance I can put that on the usb key?
But where? And how do I make it bootable?
# 4  
Old 02-03-2009
It's possible if this debian-installer thing can be convinced to obtain its files from the drive instead of the network somehow. installing a bootloader like grub on a USB flash drive is possible but sometimes tricky. Once you can get grub going, it's just a matter of experimentation until you find the config that'll let it boot the files you want.

How these machines are booting is they download /tftproot/pxelinux.0 and run it, which in turn downloads its config file, /tftproot/pxelinux.cfg/default to find out exactly what it's booting with what parameters, then finally, downloads and executes the kernel and initrd its config files told it to. Viewing the contents of /tftproot/pxelinux.cfg/default should be enlightening.

Last edited by Corona688; 02-03-2009 at 06:41 PM..
# 5  
Old 02-04-2009
Hi Corona,

Well I had no idea how these terminals installed themselves. On screen, I just see a remainning time. Thank you so much for this explanation of the process.

I tryed to cat the files in tftpboot but most of them contain garbled characters. I think they are binary files. Do you know another way to view them?
The only one visible is pxelinux.cfg/default. Does it help?

Code:
admoxa@videos:~$ find /space/tftpboot/ -type f -ls | sort; echo
20791299   16 -rw-r--r--   1 admoxa   patricio    13480 Sep  5 11:07 /space/tftpboot/pxelinux.0
20791302 9080 -rw-r--r--   1 admoxa   patricio  9280899 Nov  4 12:12 /space/tftpboot/debian-installer/i386/initrd.gz
20791303 1196 -rw-r--r--   1 admoxa   patricio  1219068 Aug 26 15:41 /space/tftpboot/debian-installer/i386/linux
20791304    4 -rw-r--r--   1 admoxa   patricio       87 Sep  5 11:22 /space/tftpboot/debian-installer/i386/ndtv.txt
20791305    4 -rw-r--r--   1 admoxa   patricio      821 Sep  5 11:17 /space/tftpboot/pxelinux.cfg/default

admoxa@videos:~$ cat -v /space/tftpboot/pxelinux.0 | head -c 100; echo; echo
fM-^\f`^^^F^OM- ^OM-(1M-@M-^NM-XM-^NM-@M-j^U|^@^@M-^IM-eM-D^0M-^I&`OM-^L^VbOM-^I&,M-.M-^L^V0M-.M-zf^

admoxa@videos:~$ gunzip -c /space/tftpboot/debian-installer/i386/initrd.gz | head -c 100; echo; echo
0707010004FC3E000041ED00000000000000000000000F49102C190000000000000008000000060000000000000000000000

admoxa@videos:~$ cat -v /space/tftpboot/debian-installer/i386/linux | head -c 100; echo; echo
fM-j^H^@^@^@M-@^GM-^LM-HM-^NM-XM-^NM-@M-^NM-PM-<^@|M-{M-|M->1^@M-, M-@t M-4^NM-;^G^@M-M^PM-kM-r1M-@M

admoxa@videos:~$ cat -v /space/tftpboot/pxelinux.cfg/default; echo
DISPLAY debian-installer/i386/ndtv.txt

DEFAULT install
TIMEOUT 50
ONTIMEOUT dd

LABEL install
 kernel debian-installer/i386/linux
 append vga=normal initrd=debian-installer/i386/initrd.gz interface=eth0 netcfg/disable_dhcp=false hostname=localhost domain=localdomain fb=false  --

LABEL dd
 localboot 0

LABEL linux
 kernel debian-installer/i386/linux
 append vga=normal initrd=debian-installer/i386/initrd.gz --

LABEL expert
 kernel debian-installer/i386/linux
 append priority=low vga=normal initrd=debian-installer/i386/initrd.gz --

LABEL rescue
 kernel debian-installer/i386/linux
 append vga=normal initrd=debian-installer/i386/initrd.gz rescue/enable=true --

LABEL auto
 kernel debian-installer/i386/linux
 append auto=true priority=critical vga=normal initrd=debian-installer/i386/initrd.gz --

PROMPT 1

# 6  
Old 02-04-2009
Looks like a customized and automated Debian net-install to me. The initrd is the INITial RamDisk, which provides a minimal booting environment to the installer. It's usually a cpio archive (sometimes a formatted "device" file, used via Loopback), so it should be possible to dig around in there and change where it expects it's installation sources.
Another possibility might be to create a local mirror of the Debian repository and change the installation to use that as it's source, so you'll only have to download the packages once (and maybe some of them again if you want to update).
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Solaris

Can't install 11.3 from USB on 5220

Hi, I have T5220 sparc server and I want to install Solaris 11.3 on that. From notes, I know that 11.4 will not be supported. It is old server, which had hardware RAID (with SAS card). I removed connection from that card and directly inserted both cables on motherboard because I want to get rid... (0 Replies)
Discussion started by: solaris_1977
0 Replies

2. Solaris

Solaris 11 install via live usb

Hello All, I am attempting to boot and install Solaris 11 via live USB on a HP DL580 Gen9 Server. Unfortunately, when I do this it boots into System Maintenance Mode. The attachment (Pic1) shows what I am seeing via the console. The BIOS is in UEFI boot. Does not work on legacy mode as I... (15 Replies)
Discussion started by: Kerbi
15 Replies

3. Ubuntu

Install deb from alternate usb

I installed a command-line system ubuntu 12.04 from usb and that's work. I don't have a internet connection so what I have to install must come from the alternate usb until I can let work my wireless. I mount the usb to /media/cdrom but when I do sudo apt-get install xorg , then he ask me for the... (3 Replies)
Discussion started by: thailand
3 Replies

4. Red Hat

How to install fedora 13 from a usb media....it should not like 'live'?

im using Dell Inspiron with windows 7 as operating system.....in my hard drive there is some 34 gb unpartitioned space and now i want to install fedora 13 into it, after installation it should be dual boot. problem here is... i have the fedora 13 image file ie fedora13-i386-DVD.iso file. ... (13 Replies)
Discussion started by: karthik437
13 Replies

5. Linux

How to install linux in a system without cdrom, usb boot, floppy, other OS?

Hello to everyone, I am new to linux and I want to move to this system after bad experiences with windows. I have also a particular problem. An old laptop is probably able to handle just linux at this point of its life. The cdrom is gone, the bios doesn't have usb boot support, there is no... (6 Replies)
Discussion started by: highkftj
6 Replies

6. Red Hat

Looking for help with creating bootable USB key

I am currently trying to create a bootable USB key that I can use to boot a couple different X86 single slot processors. Creating a basic key is as easy as can be but I am looking to customize this boot image to meet two important criteria: 1. The system must boot in text only mode as my only... (4 Replies)
Discussion started by: kingfish1760
4 Replies

7. UNIX for Dummies Questions & Answers

Where is my USB key?

Hi everybody, When I plug a USB key to my debian, where can I access the files? I don't have any user interface, what commands do I have to run to find the files in my USB key? Thanks for your help. Santiago (6 Replies)
Discussion started by: chebarbudo
6 Replies

8. SCO

How to Install and Configure USB Printer in SCO 6

I'm new in SCO 6. I installed SCO 6 with NIC driver Properly. But I cann't install and Configure USB Printer In SCO 6. Any one help me? email: address deleted by the moderator (0 Replies)
Discussion started by: karzon
0 Replies

9. Shell Programming and Scripting

Script to copy a usb key

How would I write a script to copy a USB key? (1 Reply)
Discussion started by: jo calamine
1 Replies
Login or Register to Ask a Question