[H-GEN] lilo

Gearon, Paul pgea at qcom.com.au
Thu Aug 12 02:51:08 EDT 1999


( Humbug *General* list - semi-serious discussions about Humbug and
Unix related topics.  Consider also the 'Chat' list (reply-to) if
your posting is not on-topic for 'General'.  Including this text in
your reply shows that you have not read it. )

Hi all.

For those of you who were curious as to how my partition surgery went... the
patient is alive and well.  :^)

The rest of this email is just the story of what I did (in case it's ever of
use to anyone - besides that, I'm stoked that it worked).  So anyone not
interested can just ignore this post  8-)

As suggested, after tarring all my partitions into David's huge drive (that
2GB file limit is a REAL pain), repartitioning the disk, and then untarring
the lot, it all worked.  Thanks to Robert for the suggestion.

So now I've gone from (approx sizes):
/	100MB	/dev/sda1
swap	500MB	/dev/sda2
/tmp	1GB	/dev/sda3
/var	1GB	/dev/sda4
/usr	5GB	/dev/sda5
/home	1.5GB	/dev/sda6

I now have:
/boot	10MB	/dev/sda1
swap	500MB	/dev/sda2
/	8.5GB	/dev/sda3

So now all my free HDD space is contiguous.

The original boot directory got renamed before being copied into it's own
partition (so I wouldn't hide the contents of the directory with the mount).
Then I put the drive back into my own computer.

Next I booted up with a RH install CD, and hit [enter] a few times until I
got a bash prompt on vt2 with / as a ramdisk (probably should have used a
rescue floppy, but I didn't have one handy).  Ran mknod a few times to get
sda, sda1, sda2, sda3.  Mkdir'ed a couple of mount points: /tmp/boot and
/tmp/root and mounted sda1 and sda3.  That's when I discovered something
interesting about booting up on a CD.  The device nodes disappeared as soon
as I mounted them!  I could still access the mounted partition, but the
partition's node was no longer there.  Fortunately I could just run mknod
again to re-create the node after doing the mount.  It's probably got
something to do with it being a ramdisk, and someone out there can probably
explain this behaviour, but to me it was weird  :-)  (especially then I
typed "mount" and it told me that /dev/sda1 was mounted on /tmp/boot and
there was no /dev/sda1 anymore!)

I also did a mkswap for /dev/sda2 (I think that's the command.  I'm nowhere
near a manpage atm)

Once I had the partitions mounted I made up a custom lilo.conf.  References
to drives and partitions (such as /dev/sda and /dev/sda1) were fine, but I
needed to change references to /boot to /tmp/boot (such as for the map and
kernel file locations).  lilo ran without a hitch!  I removed the CD and
rebooted, and it all worked!  It was so cool  :o)  I had no idea it could be
so easy.  You'd never be able to move an NT installation onto a completely
different partition so easily.

One caveat in all of this.  I forgot that I shouldn't use Ctrl-Alt-Del to
reboot when I finished configuring.  8-)  It rebooted, but it didn't unmount
my /tmp/root.  So first of all I went back into the CD boot and ran fsck
/dev/sda3.  That's when I discovered that fsck needs to read /etc/fstab.
Don't know why.  That was kind of annoying, but easy to overcome.

Regards,
Paul

Paul Gearon
Catapultam habeo. Nisi pecuniam omnem mihi dabis, ad caput tuum saxum immane
mittam.  (Translation from latin: "I have a catapult. Give me all the money,
or I will fling an enormous rock at your head.") 



--
This is list (humbug) general handled by majordomo at lists.humbug.org.au .
Postings only from subscribed addresses of lists general or general-post.



More information about the General mailing list