Moving hd-install to a bootable usb-stick?


Forum: USB booting
Topic: Moving hd-install to a bootable usb-stick?
started by: olliraa

Posted by olliraa on Dec. 26 2004,10:22
Hi,

I have a flawlessly working hd-install of dsl 0.9. I have installed wine and other needed applications and the size of the total install is about 200 MB. I have a 512 MB Kingston DataTraveler 2.0 and I'd like to "move" or backup the working system to a bootable usb-stick, so that if my comuter has a hd-crash, I can just put the stick in and go :D What would be the best way to do this. I know how to create a bootable dsl-usb-stick, but i's really like to just transfer this working dsl(took a lot of "tuning") to the usb-stick. The computer is an old laptop, so cd-backup is not possible (at least not cheap)Any clues?

Posted by Paperweight on Dec. 31 2004,08:35
I would like to do this too, on my laptop. I'm getting frustrated trying to backup my installed programs that disappear.
I'm afraid to backup everything to my USB pendrive because I think that it will restore everything when I boot, filling up my ram. Is there a way to backup installed programs/settings to a USB pendrive, and only load them to ram when they are needed? My guess is to treat the pendrive as a harddrive, but some say that that will ruin the pendrive. I guess you have the same problem.
Can anyone help us? The forum search is useless for me.

Edit: I guess that DSL will always only use a ramdrive for programs... is there any linux distro that can use a usb pendrive as file storage but only access it when a program is loaded? WIthout aggressive rewriting like hard drives are treated? Do I know what I'm talking about? No? Throw me a bone.

Posted by Paperweight on Dec. 31 2004,09:10
Ok, after thinking for a while, I realised that DSL already loads the programs it needs...when it needs them... from the compressed image. Therefore, if I install all of the big programs that I really want, then remaster DSL, then put the remastered version on my usb pendrive, then only use backup/restore for my files and some small programs, I should be able to have my program storage without eating up all of my ram. All that I need to know is how to remaster a DSL image. Well, you need to know the same thing. Lets use search, shall we?  :) Not saying we'll find anything.
Posted by JohnS on Dec. 31 2004,16:20
Hi guys,
I've been experimenting with something similar, I have some large apps that take up way more memory than I have when installed in ramdrive, what I have been doing is putting them, fully expanded, on the pendrive and run them directly from the pendrive.

What I did was partition the pendrive into two partitions (using sfdisk), one a 64 meg type 6 (FAT16) partition which was loaded with the usual menu item install to pendrive. The other partition has the rest and is set to be an ext2 type (which is the default for sfdisk). The second partition was formatted under DSL with mk2fs (no special options). To use this under DSL mount it then chmod it to everybody, put these in bootlocal.sh so it happens automatically:

mount /dev/sda2
chmod 777 /mnt/sda2

I then put the big apps on sda2. I do this by booting DSL without toram (so I have as much ramdisk as possible), loading the app to wherever it wants to go, then copying it over to /mnt/sda2. Depending on the app and how you invoke it you might need to add where its now located to your path in the .bashrc file or any other configuration files. If the app has its own configuration files which specify where to put files, read them etc. these will need to be modified to point to /mnt/sda2 as well.

You can also put any .dsl files you need loaded at boot time in sda2 as well (for example I put the ALSA drivers there) . When you boot just make sure you specidy sda2 as the mydsl drive and the restore drive as well, then it will backup and restore there and load any .dsl files as well. When you go to run the apps on sda2 they run directly off the pendrive, no expansion to ramdisk first.

The only problem you might have is if the app creates temp files that it reads and writes very frequently, this could cause prolems with flashdrives. If this is the case, the best thing to do is configure the app so it puts the temp files on the ramdisk (if you have room for them there). Most apps give you the option of where to put temp files.

If your pendrive is USB 2.0 and the computer supports 2.0 you should not see hardly any degradation in performance from running directly off the pen drive. If you just have USB 1.1 you might see some performance slip, it depends on the app.

I know that doesn't help olliraa too much, yours is going to be more difficult. You COULD copy the whole thing to the pendrive and use syslinux to make it bootable (I'm not quite sure how to do that, but it should be possible), BUT you then wind up with the writing a lot to the pendrive issue, flash memory has a limited number of times you can WRITE to it, you can easily exceed this for certain files if the flash is just used as a direct replacement for a hard drive. The usual solution is the load compressed image from flash to ramdisk and run off there.

Not everything needs to be in ramdrive though. My GUESS is that the swap file and var need to be in ram and probably everything else could go on the pendrive. To do that you would have to do a remaster so just the parts you want in ram get in the compressed image and everything else just gets coppied over onto the pendrive. Thats something I haven't done yet so I can't help with how to do that. Thats going to take some experts. I hope that gives a hint as to what needs to be done for this.

John S.

Posted by Paperweight on Dec. 31 2004,23:57
olliraa, here is a tutorial for remastering a hd-install onto a new CD. From there, you should be able to copy that stuff onto a USB pendrive.
< HOWTO Remaster DSL From An Existing HD Install, step-by-step procedure >

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.