Mint 5.0 Persistent USB install

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read this

Mint 5.0 Persistent USB install

Postby Jason on Fri Jun 27, 2008 12:31 pm

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
Jason
 

Linux Mint is funded by ads and donations.
 

Re: Mint 5.0 Persistent USB install

Postby grimdestripador on Fri Jun 27, 2008 3:38 pm

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.
User avatar
grimdestripador
Level 6
Level 6
 
Posts: 1069
Joined: Fri Feb 16, 2007 2:26 am

Re: Mint 5.0 Persistent USB install

Postby paulpoco on Fri Jun 27, 2008 7:21 pm

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-hardy-heron-live-usb-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
paulpoco
Level 1
Level 1
 
Posts: 4
Joined: Fri Jun 27, 2008 6:57 pm

Re: Mint 5.0 Persistent USB install

Postby kwatson512 on Thu Sep 18, 2008 1:08 pm

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?
Mint 16 64-bit Cinnamon, Lenovo ThinkPad T430s, 8GB RAM
kwatson512
Level 4
Level 4
 
Posts: 203
Joined: Sun Apr 20, 2008 7:16 pm

Re: Mint 5.0 Persistent USB install

Postby abuster on Thu Sep 18, 2008 1:52 pm

There seems to be some bugs in initrd.gz. Look here for more details: viewtopic.php?f=46&t=8780&st=0&sk=t&sd=a&start=15#p102821
abuster
Level 1
Level 1
 
Posts: 7
Joined: Thu Sep 18, 2008 1:13 pm

Re: Mint 5.0 Persistent USB install

Postby kwatson512 on Thu Sep 18, 2008 2:55 pm

I had already modified the initrd.gz file. That was in the Ryan Cloke post in the Ubuntu forums. Still no go.
Mint 16 64-bit Cinnamon, Lenovo ThinkPad T430s, 8GB RAM
kwatson512
Level 4
Level 4
 
Posts: 203
Joined: Sun Apr 20, 2008 7:16 pm

Re: Mint 5.0 Persistent USB install

Postby abuster on Thu Sep 18, 2008 3:55 pm

The Ryan Cloke post in the ubuntu forums only edit the scripts/casper file, and not both scripts/casper and init. Both need to be edited. You can download the modified initrd.gz from here:

http://files.mint-space.com/getfile,200 ... rd.gz.html
or here:
http://www.4shared.com/file/63517034/7a ... nitrd.html
abuster
Level 1
Level 1
 
Posts: 7
Joined: Thu Sep 18, 2008 1:13 pm

Re: Mint 5.0 Persistent USB install

Postby kwatson512 on Fri Sep 19, 2008 8:59 am

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 ([url]viewtopic.php?f=46&t=8780&st=0&sk=t&sd=a&start=15#p102821[/url]) 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).
Mint 16 64-bit Cinnamon, Lenovo ThinkPad T430s, 8GB RAM
kwatson512
Level 4
Level 4
 
Posts: 203
Joined: Sun Apr 20, 2008 7:16 pm

Re: Mint 5.0 Persistent USB install

Postby abuster on Fri Sep 19, 2008 9:19 am

The difference is that the file "init" inside initrd.gz also will have to be edited. As shown here:
http://www.pendrivelinux.com/2007/09/20 ... ersistent/
abuster
Level 1
Level 1
 
Posts: 7
Joined: Thu Sep 18, 2008 1:13 pm

Re: Mint 5.0 Persistent USB install

Postby kwatson512 on Fri Sep 19, 2008 2:21 pm

Abuster,

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

:(
Mint 16 64-bit Cinnamon, Lenovo ThinkPad T430s, 8GB RAM
kwatson512
Level 4
Level 4
 
Posts: 203
Joined: Sun Apr 20, 2008 7:16 pm

Re: Mint 5.0 Persistent USB install

Postby abuster on Fri Sep 19, 2008 7:09 pm

If you take away persistent from the kernel parameters, will the USB boot then?
abuster
Level 1
Level 1
 
Posts: 7
Joined: Thu Sep 18, 2008 1:13 pm

Re: Mint 5.0 Persistent USB install

Postby kwatson512 on Fri Sep 19, 2008 7:29 pm

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?
Mint 16 64-bit Cinnamon, Lenovo ThinkPad T430s, 8GB RAM
kwatson512
Level 4
Level 4
 
Posts: 203
Joined: Sun Apr 20, 2008 7:16 pm

Re: Mint 5.0 Persistent USB install

Postby abuster on Sat Sep 20, 2008 4:07 am

That's the right place. You might want to try all from scratch:

1: Boot your computer into Mint from the Live CD
2: Open a terminal window and type sudo su
3: umount /dev/sdX1
4: cfdisk /dev/sdX to partition the USB drive
5: Make 2 primary partitions. The first 750MB, primary, bootable, type 06. The second, with the space left, primary, default type. Remember to press Write before you quit.
6: umount /dev/sdX1
7: mkfs.vfat -F 16 -n mintusb /dev/sdX1
8: mkfs.ext2 -b 4096 -L casper-rw /dev/sdx2 - The label(-L casper-rw) is important you get right.
9: Reinsert the pendrive.
10: apt-get update
11: apt-get install syslinux mtools
12: syslinux -sf /dev/sdX1
13: cd /cdrom
14: cp -fr .disk casper drivers isolinux preseed .disc_id md5sum.txt /media/mintusb/
15: cd /media/mintusb
16: mv isolinux syslinux
17: cd syslinux
18: mv isolinux.cfg syslinux.cfg
19: Download the modified initrd.gz and replace the old in /media/mintusb/casper
20: Reboot, verify that the USB will boot. If it do, reboot and press TAB at the boot screen. Append persistent to the kernel parameters. For a permanent solution, edit syslinux.cfg to contain persistent in the kernel parameters.
abuster
Level 1
Level 1
 
Posts: 7
Joined: Thu Sep 18, 2008 1:13 pm

Re: Mint 5.0 Persistent USB install

Postby kwatson512 on Sat Sep 20, 2008 3:38 pm

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?
Mint 16 64-bit Cinnamon, Lenovo ThinkPad T430s, 8GB RAM
kwatson512
Level 4
Level 4
 
Posts: 203
Joined: Sun Apr 20, 2008 7:16 pm

Re: Mint 5.0 Persistent USB install

Postby grimdestripador on Mon Sep 29, 2008 6:00 pm

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
User avatar
grimdestripador
Level 6
Level 6
 
Posts: 1069
Joined: Fri Feb 16, 2007 2:26 am

Linux Mint is funded by ads and donations.
 

Return to Installation & Boot

Who is online

Users browsing this forum: gbvoris and 16 guests