How to install Wolvix to a USB Flash Drive
You can install Wolvix to a USB Flash Drive by:
- using a Wolvix CD-ROM
- using Windows
Using Wolvix / Linux:
Note! In Wolvix 1.0.5 and later there is a USB drive installer included in the
WolvixControlPanel, so there is no need to install manually as described below.
Note! Your motherboard needs to be able to boot from a USB device.
All commands described in this guide are executed from a terminal.
Make sure you have a Flash Drive with sufficient space before you start. The minimum is 512MB, or 256MB if you intend to install 'Wolvix Cub'.
1) Preparation:
Boot the Wolvix CD and download the latest syslinux tarball from
kernel.org∞ (syslinux-3.31.tar.gz will be used in this guide).
Insert the Flash Drive to your computer and wait a few seconds for Wolvix to detect it. To see if it was detected properly, start the
FileManager (Xfe) and browse to the
/mnt directory, or simply use the command:
Inside
/mnt you should see a directory called
'sda1_removable' or similar. The actual
DeviceName (sda1 in my case) may be different on your system, depending on whether you have any S-ATA or SCSI hard drives or any other flash devices in your computer. If you don't have any S-ATA or SCSI hard drives and the Flash Drive you intend to use is the only one inserted, it's probably sda1. (
/dev/sda1)
I like to use the FAT32 filesystem on my Flash Drive, but you can also use FAT16 which is the default on most Flash devices, so
this step is optional.
To format your Flash Drive with FAT32 use this command (remember to replace sda1 with your actual device):
Warning! This will destroy all data on the drive, so backup the files you want to keep and make sure you format the right device.
2) Copying files to the drive:
First, we must mount the drive so we can copy files to it:
mount /mnt/sda1_removable
Copy the needed files from the CD to the Flash Drive with the command:
cp -ra /mnt/live/mnt/hdc/* /mnt/sda1_removable/
Replace
hdc with the
DeviceName that applies to your system. Look inside the directory
'/mnt/live/mnt' if you're not sure. Inside, you should see a directory called 'hdb', 'hdc', or 'hdd', depending on how your CD/DVD drive is connected to the computer.
3) Moving files on the drive:
We need to move some files from the
/boot directory to the base (root) of the drive:
mv /mnt/sda1_removable/boot/vmlinuz /mnt/sda1_removable/
mv /mnt/sda1_removable/boot/initrd.gz /mnt/sda1_removable/
mv /mnt/sda1_removable/boot/splash.* /mnt/sda1_removable/
Then rename the file 'isolinux.cfg' to 'syslinux.cfg':
cd /mnt/sda1_removable/
mv isolinux.cfg syslinux.cfg
Again, replace sda1 with your device.
4) Editing syslinux.cfg and splash.cfg:
Now we need to edit 'syslinux.cfg' so it will find the kernel (vmlinuz), the initrd and the splash config we just moved. You need to remove all the
boot/ references, except for the last one for memtest in this file.
Change the 'syslinux.cfg' from this:
display boot/splash.cfg
default wolvix
prompt 1
timeout 100
F1 boot/splash.txt
F2 boot/splash.cfg
label wolvix
kernel boot/vmlinuz
append vga=791 max_loop=255 initrd=boot/initrd.gz init=linuxrc load_ramdisk=1 prompt_ramdisk=0 ramdisk_size=4444 root=/dev/ram0 rw
label linux
kernel boot/vmlinuz
append vga=791 max_loop=255 initrd=boot/initrd.gz init=linuxrc load_ramdisk=1 prompt_ramdisk=0 ramdisk_size=4444 root=/dev/ram0 rw
label memtest
kernel boot/memtest
To this:
display splash.cfg
default wolvix
prompt 1
timeout 100
F1 splash.txt
F2 splash.cfg
label wolvix
kernel vmlinuz
append vga=791 max_loop=255 initrd=initrd.gz init=linuxrc load_ramdisk=1 prompt_ramdisk=0 ramdisk_size=4444 root=/dev/ram0 rw
label linux
kernel vmlinuz
append vga=791 max_loop=255 initrd=initrd.gz init=linuxrc load_ramdisk=1 prompt_ramdisk=0 ramdisk_size=4444 root=/dev/ram0 rw
label memtest
kernel boot/memtest
Then edit splash.cfg
Again you need to remove
boot/, so edit the file from this:
^L^Xboot/splash.lss
^O0f
Welcome to Wolvix Live CD. Hit Enter to continue booting or press F1 for help.
To this:
^L^Xsplash.lss
^O0f
Welcome to Wolvix Live CD. Hit Enter to continue booting or press F1 for help.
5) Final step, unmount and install syslinux:
First, we move out of the Flash Drive, then unmount it.
cd
umount /mnt/sda1_removable
Then we unpack the syslinux tarball that was downloaded in the first step. (Replace 3.31 with the version you've downloaded.)
tar -xzvf syslinux-3.31.tar.gz
Go to the syslinux-3.31/mtools directory and install it to the Flash Drive.
cd syslinux-3.31/mtools
./syslinux /dev/sda1
Remember to change
sda1 with what applies to your system.
If everything goes well, you should now be able to run Wolvix from your USB Flash Drive.
Using Windows:
The method listed here has no real advantage over the method listed above,
but users who are new to Linux will find this method a bit more familiar.
1) Preparation:
You will need:
- a burned Wolvix ISO (download it from http://www.wolvix.org∞ and burn it on CD using the "Burn Image" option of your CD-ROM burning software);
- a text editor that can handle Unix-style line breaks. Notepad is NOT good at this task. I suggest Notepad Plus∞;
- a good File Manager (optional). I suggest Total Commander∞, but you can also use the Explorer (open it twice and arrange the windows horizontally);
- a USB drive formatted with FAT. Do NOT format it with FAT32! In Total Commander, right-click on the drive-letter and choose format. Make sure to choose FAT, not FAT32;
- the program syslinux. I suggest downloading syslinux 3.3.1 or better from http://syslinux.zytor.com/∞ . You just need the file syslinux.exe from the Zip Archive.
2) Copying files from the CD-ROM to the USB drive:
- Display the content of the Wolvix CD-ROM in one panel of your File Manager and display the content of the freshly-formatted USB drive in the other panel.
- Copy all files and directories from the Wolvix CD-ROM to the USB drive. Make sure to include all directories and subdirectories.
- Move those files from the /boot directory of your USB drive to the "root" directory (the parent directory of /boot) of your USB drive:
- initrd.gz
- splash.cfg
- splash.lss
- splash.txt
- vmlinuz
Finally, rename the file 'isolinux.cfg' to 'syslinux.cfg' (in the "root" directory of your USB drive)
3) Editing syslinux.cfg and splash.cfg:
- Open the file syslinux.cfg with your text editor.
- Delete all "/boot/" strings EXCEPT for the last one. The last one (/boot/memtest) is to be left untouched.
- So:
Before editing
display boot/splash.cfg
default wolvix
prompt 1
timeout 300
F1 boot/splash.txt
F2 boot/splash.cfg
label wolvix
kernel boot/vmlinuz
append vga=791 max_loop=255 initrd=boot/initrd.gz init=linuxrc load_ramdisk=1 prompt_ramdisk=0 ramdisk_size=4444 root=/dev/ram0 rw
label memtest
kernel boot/memtest
And after editing:
display splash.cfg
default wolvix
prompt 1
timeout 300
F1 splash.txt
F2 splash.cfg
label wolvix
kernel vmlinuz
append vga=791 max_loop=255 initrd=initrd.gz init=linuxrc load_ramdisk=1 prompt_ramdisk=0 ramdisk_size=4444 root=/dev/ram0 rw
label memtest
kernel boot/memtest
Save the edited syslinux.cfg file and close it.
Then, open the splash.cfg file in your editor:
Again, you need to remove
boot/, so edit the file from this:
^L^Xboot/splash.lss
^O0f
Welcome to Wolvix Live CD. Hit Enter to continue booting or press F1 for help.
Note!The first characters at the beginning of line 1 and line 2 are not readable ... that's OK. Leave them alone and just edit the text that you can read, like removing boot/ in line 1.
To this:
^L^Xsplash.lss
^O0f
Welcome to Wolvix Live CD. Hit Enter to continue booting or press F1 for help.
4) Install syslinux:
- The last step: copy the syslinux.exe file from the downloaded zip archive to the root directory of your hard disk. I suggest to C:\ .
- Open a shell. In Total Commander, navigate to the directory where syslinux.exe is and type cmd in the command line. Otherwise, navigate to the start menu, click on run program, and type cmd.
- In the shell, make sure that you are in the right drive. Type C: and hit ENTER if syslinux.exe is located on drive c:
- In the shell, make sure that you are in the right directory. Type dir and hit ENTER. You should see a list of files, including syslinux.exe.
- Now you have to know the drive letter of your USB drive. I assume it is F: for this example.
- In the shell, type syslinux F: and hit ENTER.
- If no error message appears, you can close the shell, remove the CD-ROM and push the RESET button of your computer. Wolvix should now boot from the USB drive.
CategoryGuide
There is one comment on this page. [Display comment]