SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2010-06-05 14:16:56

jeward
New Member
Registered: 2010-05-14
Posts: 5

How to make a persistent statler live USB key

Boot from the live CD.

Make two partitions on your USB key, one big enough to hold the live CD image and the other the rest of the stick.

# fdisk -l /dev/sda

Disk /dev/sda: 8000 MB, 8000110592 bytes
255 heads, 63 sectors/track, 972 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x667d2bec

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1         262     2104483+   b  W95 FAT32
/dev/sda2             263         972     5703075   83  Linux


Format the first partition as FAT 32, the second as ext2.

# mkdosfs -F 32 /dev/sda1
# mkfs -L live-rw /dev/sda2

Install unetbootin.

# aptitude update
# aptitude install unetbootin

Do unetbootin magic.

# unetbootin

For the source, choose the live cd (/dev/hdc on my system).
For the destination, choose /dev/sda1.

Once unetbootin finishes, reboot on the USB key.  Choose live and then hit TAB to edit.  Add the parameter "persistent" to the end of the line and all changes you make to the system will be saved to the live-rw filesystem on /dev/sda2!  I also change the username and hostname, but that's optional.

I think this is the ultimate USB portable debian distro!

Last edited by jeward (2010-06-05 16:02:07)

Offline

Be excellent to each other!

#2 2010-06-05 14:43:40

slapfish
#! Die Hard
From: Athens, Greece
Registered: 2009-10-22
Posts: 601

Re: How to make a persistent statler live USB key

is it possible to do something like that but with an hd instalation instead the live cd? big_smile

Offline

#3 2010-06-05 14:57:07

jeward
New Member
Registered: 2010-05-14
Posts: 5

Re: How to make a persistent statler live USB key

Yes, and then you'd also want to make a swap partition!  :-)

Offline

#4 2010-06-26 17:46:40

slapfish
#! Die Hard
From: Athens, Greece
Registered: 2009-10-22
Posts: 601

Re: How to make a persistent statler live USB key

I just make a persistent usb stick with cb alpha2 (damn, it's the amd64 version...I'll have to build it again if I want to make it bootable on all systems) and I would like to change boot menu of unetbootin. First I would like to make the "persistent" entry permanent and if it's possible I would also like to have the default menu of cb or maybe a new one without the install option.

Is something that can be done? I was thinking to dd the image in the usb but I don't think I can choose the sdb1 partition of usb...

Offline

#5 2010-06-26 18:35:44

corenominal
WRONG
From: Lincoln, UK
Registered: 2008-11-20
Posts: 5,057
Website

Re: How to make a persistent statler live USB key

I have created a couple of persistent USB installs using UNetbootin. I found that it worked brilliantly and I was able to edit the default syslinux menu to add the persistent flag and also change the username from "crunchbang" to "corenominal". Good stuff. smile

Offline

#6 2010-07-12 18:02:48

liame
#! CrunchBanger
Registered: 2009-09-01
Posts: 100

Re: How to make a persistent statler live USB key

it works very nice, finally! big_smile
now, how i install apps so they go to the persistent partition?
and how i edit the default syslinux to add the persistent flag and username and stuff?
and the locale. i need hebrew layout too. I would like it so much to be persistent... smile

mmm there must be a way to set the /home dir to the persistent partition right? anybody has a link where i can learn how to do that? smile

thanks for the how-to

EDIT: oh my goddess!! SO COOL!! i just went to explore the usb and found that in fact /home is in the persistent partition!! lol
sorry for bothering. (blush roll )

Last edited by liame (2010-07-12 18:08:10)

Offline

#7 2010-07-12 18:16:28

slapfish
#! Die Hard
From: Athens, Greece
Registered: 2009-10-22
Posts: 601

Re: How to make a persistent statler live USB key

Just do things as you would do anyway. apt-get anything you want, create users, delete users, change locales etc. Everything you add/change goes to persistent partition by default. It's a nice gadget to have around, especially when you get pissed off by your friend's windows computer smile

this is the first part of syslinux.cfg on live-usb (the rest of the entries are similar):

default menu.c32
prompt 0
menu title CrunchBang Statler
timeout 10

label unetbootindefault
menu label Default
kernel /live/vmlinuz
append initrd=/live/initrd.img boot=live live-config live-config.hostname=crunchstick live-config.username=slapfish live-config.user-fullname=CrunchBangLiveUser live-config.locales=en_US.UTF-8 live-config.timezone=Europe/Athens quiet persistent

Everything works except the timezone.. (I created the user and changed the host name first though)

EDIT: I just noticed your edit addition smile

Last edited by slapfish (2010-07-12 18:17:38)

Offline

#8 2010-07-13 14:35:54

liame
#! CrunchBanger
Registered: 2009-09-01
Posts: 100

Re: How to make a persistent statler live USB key

thank you very much slapfish

to more things i am founding problems to set are:
the time zone/correctly time.
the keyboard layout to be us,il

smile

Offline

#9 2010-07-16 21:10:22

mpierce
Member
Registered: 2010-07-16
Posts: 33

Re: How to make a persistent statler live USB key

Incredible stuff...
Fellow, I'm wading through what is now necessary to set it up correctly.
Question - do I have to ever allow any room on the FAT partition of the USB to expand for updates, etc as CB is only 700Mb.
I'm thinking 1Gb should be big enough with the remainder ext2. l

Offline

#10 2010-07-16 22:33:12

mpierce
Member
Registered: 2010-07-16
Posts: 33

Re: How to make a persistent statler live USB key

Arghhh....
Something has failed - followed directions did the updates per Slapfish; update wireless and rebooted.
Nothing saved as persistent - selecting Live has given me a Live cd.
Anyone know why?

Offline

#11 2010-07-16 23:36:52

mpierce
Member
Registered: 2010-07-16
Posts: 33

Re: How to make a persistent statler live USB key

I've redone everything once again.

Looking at the file manager shows that there is nothing on the 6Gb FAT32 partition that I created; everything on 1Gb ext2 partition. This is worrying.

Using slapfish's directions:
live-config.username=mpierce shows up correctly under File system/home/mpierce
Shouldn't this be on the ext2 partition?

live-config.locales=en_US.UTF-8 is launching with en_GB.UTF-8
live-config.timezone=Australia/Melbourne is OK

I don't think I can reboot the computer without everything failing.

Offline

#12 2010-07-17 12:44:57

slapfish
#! Die Hard
From: Athens, Greece
Registered: 2009-10-22
Posts: 601

Re: How to make a persistent statler live USB key

Sorry for taking ages to reply, I was away for some days... I'm not sure if this is the reason why your persistent usb isn't persistent but (did) you have the partitions wrong (?). Live cd goes to fat32 and persistent staff to ext2. Also double check that you have entered the persistent flag to the grub entry. Last but equally important the original default entry of grub entry (made by unetbootin) isn't working with persistent. Try the live entry and if it works you can replace the content of "default" with that of "live" + persistent flag. Hope that helps...

Offline

#13 2010-07-17 13:27:34

mpierce
Member
Registered: 2010-07-16
Posts: 33

Re: How to make a persistent statler live USB key

It failed because I didn't label the partition correctly. I gave the vfat partition the name of casper-rw because I had used a different loader which created that partition.

Unetbootin does not give you the option to create the correct persistent partition. Carelessness of my part.

I've now created a full install on the usb stick from the CD and am preparing to test this out. As the stick is 8Gb, I've created a 2.75Gb /, .75Gb swap and 4.5Gb /home directories. It is currently updating the packages and shows that it has used 1.85Gb on / but still updating.

Offline

#14 2010-07-17 13:37:40

slapfish
#! Die Hard
From: Athens, Greece
Registered: 2009-10-22
Posts: 601

Re: How to make a persistent statler live USB key

For the live-cd partition you only have to create a 700mb partition. It doesn't use more than that... anything else goes to the other partition.

Offline

#15 2010-07-17 14:20:36

mess
New Member
Registered: 2009-09-27
Posts: 3

Re: How to make a persistent statler live USB key

Slapfish,
having trouble at the "unetbootin magic" part of the description.

I have the live CB booted as VM and I only see /dev/sdb2 not /dev/sdb1 and unetbootin also requests that I mount /dev/sdb1 or /dev/sdb2 to use.
Secondly, how can I tell unetbootin to use an iso when I am running the machine off the live image i want to create (as per the first line).

Any tips, be most helpful.

Cheers,

Offline

#16 2010-07-17 14:40:07

slapfish
#! Die Hard
From: Athens, Greece
Registered: 2009-10-22
Posts: 601

Re: How to make a persistent statler live USB key

Check if sdb1 is being used by the host... I guess that if sdb1 and sdb2 partitions were created properly then it's a vm issue and not unetbootin's.

You can create a share to the folder containing the iso on host or if this is too complicated you can download it in VM.

Also, I'm guessing that your host machine is a windows one, cause if it's a linux you don't have to do it from inside alpha on VM (just in case smile).

Offline

#17 2010-07-17 15:00:52

mess
New Member
Registered: 2009-09-27
Posts: 3

Re: How to make a persistent statler live USB key

slapfish,

Thanks for that, seems the host must of been using the usb drive, actually changed to a different usb plug on the machine and re-ran the installation. Got a booting usb drive now though big_smile

how do I edit syslinux.cfg though? do I need to edit it before I create the disk with unetbootin?
Lastly, If I make changes and or save my own files, do I have to make sure I save to the live-rw file partition or is that the settings in syslinux.cfg that control that?

BTW - my host is actually a Mac running the osX which is really just a ripped off BSD spinoff.... =P

EDIT - After re-booting several times and setting the "persistent" flag in both live and default its not saving anything, simple text document saved to /home/crunchbang/documents is gone on a reboot. must be editing this options wrong somewhere.

Last edited by mess (2010-07-17 15:16:31)

Offline

#18 2010-07-17 15:28:32

slapfish
#! Die Hard
From: Athens, Greece
Registered: 2009-10-22
Posts: 601

Re: How to make a persistent statler live USB key

I'm posting the whole procedure briefly in steps to make some things more clear to you and to others that might want to do the same. If anything is wrong or can be done differently feel free to correct them/me.

1. Create the partitions as mentioning in jeward's first post. I created a 710mb sdb1 (live-cd)  and the rest for sdb2 (persistent)

2. Install iso to sdb1 with unetbootin.

3. Boot to usb and see if everything went well.

4. Boot again to check if persistent flag works:

jeward wrote:

Choose live and then hit TAB to edit.  Add the parameter "persistent" to the end of the line and all changes you make to the system will be saved to the live-rw filesystem on /dev/sda2!

5. Having logged in on usb-live you can check the sdb2 partition and see if a home folder is there. If there is then everything went smoothly.

6. Now you can edit syslinux.cfg on sdb1 and add the persistent flag on the live part. I also replaced the default part with that of live+persistent flag (see previous post) and changed the default time to 3sec.

7. Now, (what I like about linux) forget about partitions. In the file manager you can find /home/crunchbang which is actually on sdb2 and everything else that you save anywhere it will be saved on sdb2 like lets say /etc/config.conf. That's the reason you don't need more than 700mb on sdb1. Again forget about partitions and just use your system. Create any user account, make any of them to autologin with gdmsetup, change locales, install new staff etc.

Offline

#19 2010-07-17 21:25:18

mpierce
Member
Registered: 2010-07-16
Posts: 33

Re: How to make a persistent statler live USB key

Key question - how does someone edit the kernel boot script so that they do not have to enter the "persistent" flag everytime? Corenomical made reference to this.

Offline

#20 2010-07-23 00:11:34

jollysnowman
#! CrunchBanger
From: Austin, TX
Registered: 2009-11-17
Posts: 223

Re: How to make a persistent statler live USB key

Do you guys experience really high disk usage? The update was supposed to take up less than 150 megabytes, but so far it's taken up more than 600...

Offline

#21 2010-07-23 09:40:10

liame
#! CrunchBanger
Registered: 2009-09-01
Posts: 100

Re: How to make a persistent statler live USB key

mpierce wrote:

Key question - how does someone edit the kernel boot script so that they do not have to enter the "persistent" flag everytime? Corenomical made reference to this.

the file to edit is syslinux.cfg, on the first partition (where the live img is), but in my case i can't. Every way i tried to edit, open, change permissions of that file in order to edit it, i get the error:

    [ Error writing /media/Transcend/syslinux.cfg: Read-only file system ]

i tried while using the live-usb, or from my installed statler.

Offline

#22 2010-07-23 09:47:30

liame
#! CrunchBanger
Registered: 2009-09-01
Posts: 100

Re: How to make a persistent statler live USB key

jollysnowman wrote:

Do you guys experience really high disk usage? The update was supposed to take up less than 150 megabytes, but so far it's taken up more than 600...

well... i do experience REALLY high disk usage, because i put like 2 and a half giga of music on the persistent partition ROFL

Offline

#23 2010-07-23 10:10:16

liame
#! CrunchBanger
Registered: 2009-09-01
Posts: 100

Re: How to make a persistent statler live USB key

slapfish wrote:

I'm posting the whole procedure briefly in steps to make some things more clear to you and to others that might want to do the same. If anything is wrong or can be done differently feel free to correct them/me.

1. Create the partitions as mentioning in jeward's first post. I created a 710mb sdb1 (live-cd)  and the rest for sdb2 (persistent)

2. Install iso to sdb1 with unetbootin.

3. Boot to usb and see if everything went well.

4. Boot again to check if persistent flag works:

jeward wrote:

Choose live and then hit TAB to edit.  Add the parameter "persistent" to the end of the line and all changes you make to the system will be saved to the live-rw filesystem on /dev/sda2!

5. Having logged in on usb-live you can check the sdb2 partition and see if a home folder is there. If there is then everything went smoothly.

6. Now you can edit syslinux.cfg on sdb1 and add the persistent flag on the live part. I also replaced the default part with that of live+persistent flag (see previous post) and changed the default time to 3sec.

7. Now, (what I like about linux) forget about partitions. In the file manager you can find /home/crunchbang which is actually on sdb2 and everything else that you save anywhere it will be saved on sdb2 like lets say /etc/config.conf. That's the reason you don't need more than 700mb on sdb1. Again forget about partitions and just use your system. Create any user account, make any of them to autologin with gdmsetup, change locales, install new staff etc.

there r a few things i can't find how to do, as i said:
- how to open sysnux.cfg in a way to edit it (& not as read only)
&
- i installed empathy, first time it run find, but after that each time i open empathy after a new boot a password keyring asks me for a password i don't have and i can't get rid of that.
- i use us,il,es on my keyboard layout, and it works fine, besides the alt+shift. doesn't matter what i try it stays on shift+shift
- & last but not less funny: half my system (like the clock, lucky me) knows my location and timezone, and the other half not (oppenoffice believes i live sometimes in England, sometimes in the states - gnucash decided i receive my paycheck sometimes in euro from germany or u$a)

Offline

#24 2010-07-23 13:53:29

jollysnowman
#! CrunchBanger
From: Austin, TX
Registered: 2009-11-17
Posts: 223

Re: How to make a persistent statler live USB key

I saw my disk usage increase by 900mb just by running apt-get dist-upgrade. I ran apt-get clean and autoclean, I've been going through and removing packages/applications, but that still doesn't explain how an update can take up that much space.

Can someone help? This USB stick is obviously supposed to be minimal, but with 1.16 gB of storage and 90% of it used, I'm a little worried about the next update.

Offline

Be excellent to each other!

#25 2010-07-23 19:53:25

anonymous
The Mystery Member
From: Arch Linux Forums
Registered: 2008-11-29
Posts: 9,413

Re: How to make a persistent statler live USB key

@liame - Launch your text editor with gksudo like:

gksudo gedit /media/Transcend/syslinux.cfg

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo