LinHES Forums
http://forums.linhes.org/

Testing new releases via dual boot; lilo issues
http://forums.linhes.org/viewtopic.php?f=5&t=6777
Page 1 of 1

Author:  bshroyer [ Fri Nov 04, 2005 8:06 pm ]
Post subject:  Testing new releases via dual boot; lilo issues

I've had bad experiences in upgrading to new releases. I know that it's my fault, due to poor hardware/mobo choices, but I've had lousy luck with every R5a release I've attempted.

While R4V5 is working fine (perfectly!) for me right now, R5A22 has released to rave reviews. I'm a tinkerer. I've got to try it out.

So...

I got it in my head that I could create a "testing" root partition. My default boot system now looks like this:
Code:
/dev/hda1     /
/dev/hda2     swap
/dev/hda3     (not mounted)
/dev/hda4     /myth
/dev/lvm      /myth/tv


(I moved /cache from /dev/hda3 to /myth to allow the use of /dev/hda3 as my alternate, testing root partition.)

I then mounted /dev/hda3, mirrored /dev/hda1 to /dev/hda3 via rsync, and edited lilo.conf to allow for a second boot option:

Code:
image=/boot/vmlinuz-2.4.25-chw
        root=/dev/hda1
        label=Linux
        initrd=/boot/initrd.gz
        read-only

image=/boot/vmlinuz-2.4.25-chw
        root=/dev/hda3
        label=mirror
        initrd=/boot/initrd.gz
        read-only



I've also modified /dev/hda3/etc/fstab to mount /dev/hda3 at /

I then issue
Code:
lilo -v
and reboot. The lilo selection menu comes up, I select mirror, and it boots. but...
Code:
root@mythbox:/ # df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/hda1              3901052   2022980   1680476  55% /
/dev/root.old             2182       342      1840  16% /initrd
/dev/hda4            181388640  40653576 140735064  23% /myth
/dev/vg/myth         490096632 247306404 242790228  51% /myth/tv


No matter what I try, I can't get the system to boot up with /dev/hda3 mounted as /

Am I overlooking something simple in my attempt to boot from /dev/hda3?

And perhaps more importantly - if I do succeed in my quest, will I be able to install R5A22 to /dev/hda3 for testing, while retaining the ability to boot R4V5 off /dev/hda1 if things don't work out?

Author:  mad_paddler [ Mon Nov 14, 2005 3:52 am ]
Post subject: 

I'll have a crack at this soon and post my findings :)

"/dev/vg/myth" mounted on /myth/tv

whats that all about?

Author:  bshroyer [ Mon Nov 14, 2005 6:49 am ]
Post subject: 

Quote:
"/dev/vg/myth" mounted on /myth/tv

what's that all about?


I added two 250 GB drives, used LVM to create a 500GB volume group, then mounted the vg at /myth/tv. My original 200GB drive has a 180 GB hda4 partition, mounted at /myth (the default.)

This gives me 180 GB for video storage - I also use this partition as the incremental backup device for the other computers in my house (/myth/backup). I've also now got a HUGE storage device for the livetv cache (/myth/cache) -- not that I'd ever need that much cache.

I've got some more detailed diagnostics in another post in this forum http://mysettopbox.tv/phpBB2/viewtopic.php?t=6806&highlight=

Note that with the modifications I've done, everything still works -- that is, nothing's broken. My original intent, dual boot, just isn't happening.

Author:  nermander [ Mon Nov 14, 2005 7:53 am ]
Post subject: 

I THINK the problem can be that your machine boots using initrd.

Author:  bshroyer [ Mon Nov 14, 2005 1:26 pm ]
Post subject: 

I'll admit that I don't know enough about the boot process to understand what initrd is or does. I'll even admit that I've researched it (at http://www.tldp.org/LDP/Linux-Filesystem-Hierarchy/html/initrd.html for example) and I still have no clue what initrd does. I can read the words, it simply makes no sense to me.

Are you sating that there could be something hard-coded in KnoppMyth's initrd that I need to change (create a new initrd) to allow mount of root at hda3?

==========
[edit]
I just did some poking around in initrd, which is still mounted. Everything in /initrd/etc looks clean -- there's no mention of hda1 or root in there.

However...

/initrd/linuxrc contains:

Code:
mount -t /ext3 /dev/hda1 /mnt
/static/pivot_root /mnt /mnt/initrd


So... if I create another initrd, modify this file to refer to hda3, then specify this file in lilo.conf, I could have this licked. Does that look right to you?


Found instructions for building initrd: http://www.faqs.org/docs/evms/x3834.html

Author:  EvilTwin [ Mon Nov 14, 2005 3:25 pm ]
Post subject: 

Quote:
I still have no clue what initrd does

Think of it as a virtual floppy disk to load drivers from or maybe as the kernel's "backpack". Booting is done at a very, very low level with a very small amount of code. The only disk access available asking the BIOS to read specific disk blocks into memory. Thus if you need anything that isn't built into the kernel image (like modules) you need to have a "RAM disk" image that contains it, which can be loaded by the same low level mechanism. There are too many reasons for not building the drivers directly into the kernel to go into here. It's better to have a mechanism which lets you pack the things you'll need in a seperate bundle. Part of what running lilo does is to generate the appropriate list of blocks for the kernel and RAM disk. However all of those blocks need to be in the same partition (You can't grab your backpack to get your bus pass if it's across town).

Author:  mad_paddler [ Mon Nov 14, 2005 5:07 pm ]
Post subject: 

If initrd is the problem, you could try removing "initrd=/boot/initrd.gz" from the mirror section in ur lilo.conf.

Or would you need to recompile the kernel without the ramdisk aswell?

Author:  tjc [ Mon Nov 14, 2005 7:52 pm ]
Post subject: 

I just dug back through my old multi-boot setups. With /dev/hda1 as / Set up a permanent mount for /dev/hda3 on /mirror in your /etc/fstab like this:
Code:
/dev/hda1  /  ext3 defaults,errors=remount-ro  0  1
/dev/hda3  /mirror  ext3 defaults,errors=remount-ro  0  1

fix your lilo.conf to look like this:
Code:
image=/boot/vmlinuz-2.4.25-chw
        root=/dev/hda1
        label=hda1-Linux
        initrd=/boot/initrd.gz
        read-only

image=/mirror/boot/vmlinuz-2.4.25-chw
        root=/dev/hda3
        label=hda3-Linux
        initrd=/mirror/boot/initrd.gz
        read-only

Then run lilo. You should now be able to boot to the alternate image. Once you can do that, do the reverse setup. The /etc/fstab on hda3 should mount hda1 as mirror and the lilo.conf should have the files for hda1 labelled Linux coming from there, as shown here:
Code:
/dev/hda3  /  ext3 defaults,errors=remount-ro  0  1
/dev/hda1  /mirror  ext3 defaults,errors=remount-ro  0  1

Code:
image=/mirror/boot/vmlinuz-2.4.25-chw
        root=/dev/hda1
        label=hda1-Linux
        initrd=/mirror/boot/initrd.gz
        read-only

image=/boot/vmlinuz-2.4.25-chw
        root=/dev/hda3
        label=hda3-Linux
        initrd=/boot/initrd.gz
        read-only

Note that you do not need to run lilo again this setup is for the future when you may need to run lilo from this image.
BTW - As they were your labels were going to get confusing, so I'd recommend calling them "hda1-Linux" and "hda3-Linux" as shown above instead of "Linux" and "mirror".

Author:  bshroyer [ Mon Nov 14, 2005 8:39 pm ]
Post subject: 

Thanks for taking the time to lay all of this out.

I'll have time this weekend to give it a go - I'll post back with my findings.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/