Page 1 of 1

Mint 5.0 Persistent USB install

Posted: Fri Jun 27, 2008 12:31 pm
by Jason
Hello all!

After many days of struggling with getting Mint 5.0 to install on a USB flash drive, I'm a little lost and need some assistance.

What I'm trying to do is get Mint 5 to install to the USB flash and be persistent, so I can save changes to the flash drive (doc's, favorites, etc..).

I haven't found any info on how to do this exactly, but knowing that Mint is based on Ubuntu, I went to PenDriveLinux.com's site and used their instructions for an Ubuntu 8.04 persistent install, which seems to have worked, with some minor annoyances. It seems that the program (script) they have makes the startup menu and boot splash screen say Ubuntu, which confuses people (I'm doing this to be able to show people an alternative to Windows). I personally like Ubuntu just fine, but without the preloaded Java and Flash and Codecs, etc..., it's not ready for Grandma's PC just yet, where Mint preloads almost everything that an average user will need for surfing, home PC use, etc.

Is there another script that does the same thing, or is there a way to edit the one from pendrivelinux? I figured out the syslinux file can be edited to change the boot menu text, but where would I look for the Ubuntu splash-loading bar screen and how would I change it?

Also, are there any other problems I should be aware of with this method?

This is my first post here, btw. Thanks to all the people who made Mint possible, it's a great alternative to MS Windows!

Jason
jason@onestoptechnologyshop.com

Re: Mint 5.0 Persistent USB install

Posted: Fri Jun 27, 2008 3:38 pm
by grimdestripador
BUMP! (my indication that I will an actual answer for this post)

From my experiance of live usb, I find the time I have spent getting mint to do persistance could be better spend formatting a normal USB live boot (such as pendrive linux for mint 5) and a boot script. Take your 4 GB drive. Partition it with your windows utility (while loading syslinux and stuff). Reboot, now shrink the fat32 boot volume size. Create another fat32 or ext2 partition**. Thow in your downloaded debs, and create yourself a makemine.sh bash file to replace your home folder to the new partition, and execuite the debs. I did this on a 2.5" External USB. It should work with most.

**Use of fat32 or ext2 is perfereced since NAND based flash devices have limited read/write cycles and don't play well with journling of ext3.

For coded instructions rather than psudocode, ask.

Re: Mint 5.0 Persistent USB install

Posted: Fri Jun 27, 2008 7:21 pm
by paulpoco
I got it to work using Ryan Cloke's blog. He does a blog of "Ubuntu 8.04 Hardy Heron Live USB How-to". I used his instructions for Hardy, with modifications to the Elyssa syslinux.cfg.

http://www.ryancloke.com/ubuntu-804-har ... sb-how-to/

The only things not persistent or won't install are:
1) Time Zone doesn't to stay as changed by user.
2) The "Install Icon" comes back after being deleted when ever rebooted.
3) EnvyNG tries to install ATI drivers but when it asks to reboot, it reboots but hangs. ATI control panel reports driver not installed.

I used an OCZ Rally2 8gig flash drive. 1st partition is FAT16 about 1.5gig and 2nd is Ext3 with the rest of the drive. I made the 1st partition large to have PortableApps installed for when on other computers and do not want to reboot.

Here is my syslinux.cfg


default vesamenu.c32
timeout 100

menu background splash.jpg
menu title Welcome to Linux Mint 5 Elyssa
menu color border 0 #112da323 #00000000
menu color sel 7 #ffffffff #332da323
menu color title 0 #ff2da323 #00000000
menu color tabmsg 0 #ff2da323 #00000000
menu color unsel 0 #ff2da323 #00000000
menu color hotsel 0 #ff000000 #ffffffff
menu color hotkey 7 #ffffffff #ff000000
menu color timeout_msg 0 #ffffffff #00000000
menu color timeout 0 #ffffffff #00000000
menu color cmdline 0 #ffffffff #00000000
menu hidden
menu hiddenrow 5
label live
menu label Start Linux Mint Persistent
kernel vmlinuz
append file=/preseed/mint.seed boot=casper persistent initrd=initrd.gz quiet splash --
menu default
label xforcevesa
menu label Start Linux Mint in compatibility mode
kernel vmlinuz
append file=/preseed/mint.seed boot=casper xforcevesa persistent initrd=initrd.gz ramdisk_size=1048576 root=/dev/ram rw noapic noapci nosplash irqpoll --
label memtest
menu label Memory Test
kernel memtest
label local
menu label Boot from local drive
localboot 0x80

Re: Mint 5.0 Persistent USB install

Posted: Thu Sep 18, 2008 1:08 pm
by kwatson512
I just went through the entire procedure, but still got BusyBox on booting the USB drive. I do get the basic boot splash screen but it fails before bringing up the desktop.

What next?

Re: Mint 5.0 Persistent USB install

Posted: Thu Sep 18, 2008 2:55 pm
by kwatson512
I had already modified the initrd.gz file. That was in the Ryan Cloke post in the Ubuntu forums. Still no go.

Re: Mint 5.0 Persistent USB install

Posted: Fri Sep 19, 2008 8:59 am
by kwatson512
Well, I don't see the difference. Ryan's procedure includes the following:
Step Four- Time to fix the initrd filesystem
There is a simple error with the casper script in the initrd filesystem. We will need to extract, edit the casper script and re-pack the initrd.gz.

Code: Select all

cd /home/ryan/hardy-usb/
mkdir initrd_old
cd initrd_old
gunzip < ../initrd.gz | cpio -i --make-directories
cd scripts
gedit casper
Now, search for "mount ${cowdevice} -t ${cow_fstype} -o rw,noatime,mode=755 /cow". Remove "mode=755". So the line should look like this:

Code: Select all

mount ${cowdevice} -t ${cow_fstype} -o rw,noatime /cow || panic "Can not mount $cowdevice on /cow"
After your have modified and saved the casper script, we need to repack the initrd file system.

Code: Select all

cd ..
find ./ | cpio -H newc -o > ../initrdnew
cd ..
rm initrd.gz
mv initrdnew initrd
gzip initrd
Now the new initrd.gz is modified and ready to go.
The link you suggested above (viewtopic.php?f=46&t=8780&st=0&sk=t&sd= ... 15#p102821) outlined the exact same process.

Have you identified additional bugs in the initrd.gz file, besides the need to remove "mode=755" from the mount ${cowdevice} line? If so, I'll be happy to make the change or replace my initrd.gz with your offer. I just really want to understand what isn't working (for my education and fun).

Re: Mint 5.0 Persistent USB install

Posted: Fri Sep 19, 2008 2:21 pm
by kwatson512
Abuster,

Thanks for the clarification. Alas, I substitued your initrd.gz for mine, but got the same results--BusyBox. Still no successful USB Mint.

:(

Re: Mint 5.0 Persistent USB install

Posted: Fri Sep 19, 2008 7:29 pm
by kwatson512
Unfortunately, no. But I might not have made the right change (possible newbie attempt). I deleted "persistent" from the syslinux.cfg so that it looks like this:

Code: Select all

default vesamenu.c32
timeout 100

menu background splash.jpg
menu title Welcome to Linux Mint 5 Elyssa
menu color border 0 #112da323 #00000000
menu color sel 7 #ffffffff #332da323
menu color title 0 #ff2da323 #00000000
menu color tabmsg 0 #ff2da323 #00000000
menu color unsel 0 #ff2da323 #00000000
menu color hotsel 0 #ff000000 #ffffffff
menu color hotkey 7 #ffffffff #ff000000
menu color timeout_msg 0 #ffffffff #00000000
menu color timeout 0 #ffffffff #00000000
menu color cmdline 0 #ffffffff #00000000
menu hidden
menu hiddenrow 5
label live
menu label Start Linux Mint Persistent
kernel vmlinuz
append file=/preseed/mint.seed boot=casper initrd=initrd.gz quiet splash --
menu default
label xforcevesa
menu label Start Linux Mint in compatibility mode
kernel vmlinuz
append file=/preseed/mint.seed boot=casper xforcevesa persistent initrd=initrd.gz ramdisk_size=1048576 root=/dev/ram rw noapic noapci nosplash irqpoll --
label memtest
menu label Memory Test
kernel memtest
label local
menu label Boot from local drive
localboot 0x80
Is there another place I should look?

Re: Mint 5.0 Persistent USB install

Posted: Sat Sep 20, 2008 3:38 pm
by kwatson512
abuster, it worked! Thank you!

I must have copied something incorrectly before.

I still have a small problem. My installation is persistent now, but I don't think it's storing anything on the casper-rw partition. I don't know how to actually see what's on a partition besides using gparted as a window. When I open gparted and look, here's what I have:
Partition Filesystem Mountpoint Label Size Used Unused Flags
/dev/sda1 fat16 /cdrom _ 753.02 MiB 691.00 MiB 62.02 MiB boot
/dev/sda2 ext2 _ casper-rw 14.39 GiB --- ---
It lines up in gparted better than this shows. I added the underscores to indicate empty fields (label for sda1 and mountpoint for sda2).

There's a warning triangle on the sda2 partition. When I open it and look at "information" it says:
Warning: Unable to find mountpoint
Unable to read the contents of this filesystem!
Because of this some operations may be unavailable.
Do I need to modify fstab? Also, is 750 MB enough room if I update and add software?

Re: Mint 5.0 Persistent USB install

Posted: Mon Sep 29, 2008 6:00 pm
by grimdestripador
kwatson512 wrote:I just went through the entire procedure, but still got BusyBox on booting the USB drive. I do get the basic boot splash screen but it fails before bringing up the desktop.

What next?
when in busy box, you need to mount you live /dev/sda1 partition to /meida/cdrom