Install to flash drive

Asked by ekan

I've downloaded the latest version, but how do I install wicker to a USB flash drive?

Question information

Language:
English Edit question
Status:
Solved
For:
Wicker Edit question
Assignee:
No assignee Edit question
Solved by:
ekan
Solved:
Last query:
Last reply:
Revision history for this message
ekan (eric-theredpost) said :
#1

Procedure for installing to a new USB drive:
- check the device name, should be /dev/sdX
 mount
 umount /dev/sdX
 fdisk /dev/sdX
- remove all partitions (if already exist, use 'p' to check)
 d (1-4)
- create new partitions
 n, p, 1, enter, +750M, a, 1, t, 6
 n, p, 2, enter, enter
- write partitions to disk
 w
- format partitions
 mkfs.vfat -F 32 -n ubuntu /dev/sdX1
 mkfs.ext2 -b 4096 -L casper-rw /dev/sdX2
- mount partitions on computer (take drive out and put back in)
- Copy the contents of wicker-master over to the drive (first partition -- the second partition is for persistence later)
 cp -R wicker-master/* /media/ubuntu
- Unmount the drive.
 umount /dev/sdX1
 umount /dev/sdX2
- Run syslinux to make bootable. BE CAREFUL YOU COULD ERASE YOUR HARD DISK IF CARELESS.
 syslinux /dev/sdX1
- write the MBR
 lilo -M /dev/sdX

Revision history for this message
openhacker (leisner) said :
#2

A good strategy is to have r/w permissions as a user to the usb keys.

Then commands like cfdisk and syslinux can be run as a user, instead of root.

On ubuntu 7.10, usb keys have r/w in group plugdev, adding your account to /etc/group does away with
the problem.

In the above instructions, ekan forgets to mention to commands should be run as root (or under sudo).

Revision history for this message
openhacker (leisner) said :
#3

I tried to follow the above instructions (I normally use cfdisk, also sfdisk is good for cookbook approaches)

Under "create new partitions", I think its missing a "1"

Partition number (1-4): 1
First cylinder (1-3822, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-3822, default 3822): +750M

Revision history for this message
openhacker (leisner) said :
#4

you can run partprobe /dev/sdX
to cause the drivers to be remounted (if you automatically remount usb drives)

Revision history for this message
edvallie (eric-cs) said :
#5

i'm a bit confused about the directions here - they seem a bit outdated.

I can get through the majority of the writeup without too much trouble, but there is no directory called wicker-master.

Is this a depricated folder name? Does it mean the root directory of where you untar the file to?

Revision history for this message
ekan (eric-theredpost) said :
#6

Yep, the root directory of where you untar all the files. It should be named "master" or "wicker-master" or some such thing...

Revision history for this message
edvallie (eric-cs) said :
#7

In the directions it specifically has you copy over the root directory, which includes sym links. You have the partition setup as FAT, which doesn't support symlinks, isn't this setting up the user for failure? Is there any concrete reason for using FAT?

Revision history for this message
ekan (eric-theredpost) said :
#8

The first partition is FAT to allow for booting, the second partition is ext2. The FAT partition contains a compressed image (squashfs) that unloads on first boot into the second ext2 partition. Every boot thereafter boots from that second partition. There's a symlink from the user's home directory (which is contained within the squashfs file) to the redpost_images folder on the first partition.

There shouldn't be any symlinks on the first FAT partition...

Revision history for this message
ekan (eric-theredpost) said :
#9

Just a note: Change the "mkfs.ext2" in the instructions to "mkfs.ext3" for better file reliability.

Revision history for this message
ekan (eric-theredpost) said :
#10

New, updated instructions:

1. check the device name, should be /dev/sdX
df
umount /dev/sdX
fdisk /dev/sdX

2. remove all partitions (if already exist, use 'p' to check)
d (1-4)

3. create new partitions (you may need to use a different size for the first partition other than 750M depending on the size of your flash drive)
n, p, 1, enter, +750M, a, 1, t, b
n, p, 2, enter, enter

4. write partitions to disk
w

5. format partitions
mkfs.vfat -F 32 -n ubuntu /dev/sdX1
mkfs.ext3 -b 4096 -L casper-rw /dev/sdX2

6. mount partitions on computer (take drive out and put back in if your OS automounts, Ubuntu does)

7. Download the latest version of Wicker from Sourceforge (http://sourceforge.net/projects/redpost/) and uncompress the image:
tar xvzf wicker-beta-2008-11-21.tar.gz2

8. Copy the contents of wicker-beta (may be called wicker-master) over to the drive (first partition -- the second partition is for persistence later)
cp -R wicker-beta/* /media/ubuntu

9. Unmount the drive.
umount /dev/sdX1
umount /dev/sdX2

10. Run syslinux to make bootable. BE CAREFUL YOU COULD ERASE YOUR HARD DISK IF CARELESS.
syslinux /dev/sdX1

11. write the MBR
lilo -M /dev/sdX