On Wed, Aug 17, 2011 at 19:32, Karl Schmidt <karl at xtronics.com>
wrote:> I have a need to have a live Linux (Debian or sysrescued ) to boot off a
> hard-drive so that the hard-drive ends up umounted after boot. (for running
> partimage ).
>
> I've gone down the memdisk iso route and read about the issues there -
I've
> seen a way to do this by mounting over nfs (messy) - but I want to do this
> without the network.
>
> I'm thinking that there should be a way to loop mount the needed files
on a
> ram-disk.
>
> I've Googled this a lot - I'm finding pole talking about how their
setup
> fails to work, but no working solutions. ?Can someome point me in the right
> direction?
Hello!
I've used System Rescue CD for quite a while directly booted from
either a USB stick or installed Hard Drive, but unfortunately lately
it's undocumented (or not very obvious).
But in fact the recipe is quite easy:
* download the ISO of the latest System Rescue CD;
* loop mount it to extract some files;
* the essential ones are:
* initram.igz (the init ramfs of sysrcd);
* kernel for either 32 bits or 64 bits: rescuecd, respectively rescue64;
* the sysrcd root fs: sysrcd.dat
* you could also take the f{1..7}*.msg files in which case you
also need to update the extlinux.conf to use them (see isolinux.conf
from the mounted CD-ROM);
* format a partition either with FAT or EXT2 / EXT3 (I use EXT2)
and install extlinux on it; (or you can skip this if you already have
one;)
* put the above mentioned files in a folder (I use sysrcd) inside
the formated partition;
* add the following to extlinux.conf (update it as necessary):
~~~~
label rescue
linux /sysrcd/rescuecd
initrd /sysrcd/initram.igz
append subdir=sysrcd docache setkmap=us
~~~~
What the options mean:
* subdir=sysrcd -- it tells sysrcd to scan all partitions for
`sysrcd.dat` inside this directory;
* docache -- it tells sysrcd to load `sysrcd.dat` into memory,
thus allowing you to remove the USB stick or operate entirely without
disk activity;
* setkmap=us -- to not ask you for keyboard;
Warning:
* if it fails to find the USB stick in a timely manner, add the
following: scandelay=x
* for other options see:
http://www.sysresccd.org/Sysresccd-manual-en_Booting_the_CD-ROM
* useful optionts:
* dodhcp
* initscript=sshd:start
* rootpass=1234
I usually keep a version of sysrcd on every computer I have in
case the main OS breaks. (You could protect it with a password from
the boot-loader to restrict access to it.)
Hope this is helpful,
Ciprian.