Local boot using NFS image

Help with booting MiniMyth

Moderator: Pablo

Post Reply
Spulit
Contributor
Posts: 181
Joined: Tue Dec 30, 2008 5:54 pm

Local boot using NFS image

Post by Spulit » Tue May 19, 2009 11:28 pm

Hi,

I tried to local boot MM version 67b6 by using the NFS image. This is what I did:

- Created an ext3 partition labeled "minimyth"
- Moved the contents of rootfs (which is inside the nfs image tarball) and kernel file to the root of the ext3 partition
- Added the minimyth.conf file to /conf/default/ folder in the ext3 partition
- Installed the MBR on the disk
- Installed and configured Extlinux on that partition
-- The extlinux.conf looks like:
LABEL minimyth
KERNEL kernel
APPEND root=/dev/sda1 MM_MINIMYTH_BOOT_URL=file:/minimyth/

And the system boots! However, it fails fetching the minimyth.conf file... By logging in the system, I notice that the /minimyth folder is empty. By analysing the logs, there are no trace of errors on mounting the "minimyth" partition on /minimyth. Does the partition on which the minimyth.conf file resides need to be using FAT32 filesystem?

Thanks

Pablo
Site Admin
Posts: 4182
Joined: Tue Dec 14, 2004 2:13 am
Location: La Jolla
Contact:

Re: Local boot using NFS image

Post by Pablo » Wed May 20, 2009 12:12 am

I believe you are having a problem because your boot directory and your root directory are the same partition. MiniMyth want to mount /dev/sda1 as /minimyth because it is labeled minimyth. However, /dev/sda1 is already mounted as /, so the mount fails. Since /minimyth is not mounted, MiniMyth cannot find the minimyth.conf file. However, it had already created the /minimyth directory because it does not know that it will fail. (MiniMyth should track whether or not I created the directory and delete it on failure).

You should create separate partitions for the boot directory and the root file system directory. The boot directory should be labeled minimyth and it should contain the conf directory.
MiniMyth running on an Acer ApireRevo 3610 and a Zotac ZBOX-ID80-U. Find out more at my MythTV page.

Spulit
Contributor
Posts: 181
Joined: Tue Dec 30, 2008 5:54 pm

Re: Local boot using NFS image

Post by Spulit » Wed May 20, 2009 11:06 am

But does that partition where the conf/ folder will reside need to be FAT32? Or may it be ext3? I'm asking this because I tried formatting that partition as ext3 (being labeled 'minimyth') and it seems MM wasn't able to mount it on /minimyth.

Thanks!

Spulit
Contributor
Posts: 181
Joined: Tue Dec 30, 2008 5:54 pm

Re: Local boot using NFS image

Post by Spulit » Wed May 20, 2009 11:32 am

Well, didn't work with FAT32 also.
I have three partitions /dev/sda1-3, labeled 'image1', 'image2', 'minimyth', respectively.
After MM boots, I have:
/dev/disk/by-label/image1 -> ../../disk-minimyth
/dev/disk/by-label/image2 -> ../../sda2
/dev/disk/by-label/minimyth -> ../../sda3

Any idea?

Thanks

Spulit
Contributor
Posts: 181
Joined: Tue Dec 30, 2008 5:54 pm

Re: Local boot using NFS image

Post by Spulit » Wed May 20, 2009 2:32 pm

Hi,

My fault! I was misusing the MM_MINIMYTY_BOOT_DEVICE parameter. Now it boots ok, even with the boot partition formated with ext3 fs!
Nice! :)

Thanks a lot!

Pablo
Site Admin
Posts: 4182
Joined: Tue Dec 14, 2004 2:13 am
Location: La Jolla
Contact:

Re: Local boot using NFS image

Post by Pablo » Wed May 20, 2009 4:25 pm

I am glad it is working now.

It should work with the conf directory on ext2, ext3, fat, vfat and msdos partitions. However, of these filesystems only ext2 of ext3 are compiled into the kernel. Therefore, the root partition needs to be either ext2 or ext3.
MiniMyth running on an Acer ApireRevo 3610 and a Zotac ZBOX-ID80-U. Find out more at my MythTV page.

bowmo
Contributor
Posts: 116
Joined: Sat Jul 19, 2008 11:19 am

Re: Local boot using NFS image

Post by bowmo » Thu May 28, 2009 8:49 pm

hmm.. tried to setup localboot with .66. But can't get it to boot.

First extlinux complains about it can't find "linux" (I have specified the "KERNEL kernel" parameter in extlinux.conf)

If I then try to enter the boot image (/boot/kernel root=/dev/sda1) I get a kernel panic, and it can't mount the root filesystem...

The kernel is taken from the nfs package, as well as the rootfs..

Did you use another kernel?

/ Thomas

Pablo
Site Admin
Posts: 4182
Joined: Tue Dec 14, 2004 2:13 am
Location: La Jolla
Contact:

Re: Local boot using NFS image

Post by Pablo » Thu May 28, 2009 9:03 pm

You need to use the test release. Support for local boot with the read-only root file system remaining on the disk was not added until after 66.
MiniMyth running on an Acer ApireRevo 3610 and a Zotac ZBOX-ID80-U. Find out more at my MythTV page.

Spulit
Contributor
Posts: 181
Joined: Tue Dec 30, 2008 5:54 pm

Re: Local boot using NFS image

Post by Spulit » Tue Jun 02, 2009 9:50 am

Indeed!

bowmo
Contributor
Posts: 116
Joined: Sat Jul 19, 2008 11:19 am

Re: Local boot using NFS image

Post by bowmo » Tue Jun 02, 2009 4:34 pm

Hmm.. tried 67b9, it went through the initialisation routines, but didn't fire up X..

setup is a epia M1000, with 512Mb ram / 1Gb flash disk..

Btw. I dropped extlinux, and used GRUB instead (I couldn't get extlinux to work, it seemed like it didn't read the config file at all, and insisted on booting an image called "linux" instead of "kernel" as I specified..)

/ Thomas

Pablo
Site Admin
Posts: 4182
Joined: Tue Dec 14, 2004 2:13 am
Location: La Jolla
Contact:

Re: Local boot using NFS image

Post by Pablo » Tue Jun 02, 2009 4:58 pm

bowmo wrote:Hmm.. tried 67b9, it went through the initialisation routines, but didn't fire up X..
This often happens when the root file system is not extracted and copied as user root. Did you extract and copy the root file system as user root?
Btw. I dropped extlinux, and used GRUB instead (I couldn't get extlinux to work, it seemed like it didn't read the config file at all, and insisted on booting an image called "linux" instead of "kernel" as I specified..)
What did you call the config file?
MiniMyth running on an Acer ApireRevo 3610 and a Zotac ZBOX-ID80-U. Find out more at my MythTV page.

bowmo
Contributor
Posts: 116
Joined: Sat Jul 19, 2008 11:19 am

Re: Local boot using NFS image

Post by bowmo » Wed Jun 03, 2009 10:29 pm

Hmm.. Can't remember what I did the first time I tried (I deleted all the files, and did a localboot with the ram image instead)

Anyway, I have now tried with 67b11, and this time it boots up nicely.. Only thing is that I think it's a just a tad slow, but that could be the CF card that I use (I noticed that it was slower to load the ram image from the CF than using pxelinux to boot via network!)

/ Thomas

Pablo
Site Admin
Posts: 4182
Joined: Tue Dec 14, 2004 2:13 am
Location: La Jolla
Contact:

Re: Local boot using NFS image

Post by Pablo » Thu Jun 04, 2009 10:32 pm

bowmo wrote:Hmm.. Can't remember what I did the first time I tried (I deleted all the files, and did a localboot with the ram image instead)

Anyway, I have now tried with 67b11, and this time it boots up nicely.. Only thing is that I think it's a just a tad slow, but that could be the CF card that I use (I noticed that it was slower to load the ram image from the CF than using pxelinux to boot via network!)

/ Thomas
MiniMyth may be the cause of slower than expected CF loading. Unfortunately, many CF cards do not support DMA yet Linux decides that they do (either due to faulty information from the flash card or faulty information from the controller to which they are connected). Linux attempts to blacklist bad bad CF cards. Unfortunately, this does not catch all faulty CF cards and does not catch faulty controllers. In order to eliminate CF access boot failures due to DMA issues, I have patched the kernel such that DMA is disabled for all CF cards.
MiniMyth running on an Acer ApireRevo 3610 and a Zotac ZBOX-ID80-U. Find out more at my MythTV page.

bowmo
Contributor
Posts: 116
Joined: Sat Jul 19, 2008 11:19 am

Re: Local boot using NFS image

Post by bowmo » Fri Jun 05, 2009 10:56 am

Pablo wrote:MiniMyth may be the cause of slower than expected CF loading. Unfortunately, many CF cards do not support DMA yet Linux decides that they do (either due to faulty information from the flash card or faulty information from the controller to which they are connected). Linux attempts to blacklist bad bad CF cards. Unfortunately, this does not catch all faulty CF cards and does not catch faulty controllers. In order to eliminate CF access boot failures due to DMA issues, I have patched the kernel such that DMA is disabled for all CF cards.
I know that you've patched the linux kernel to disable DMA, but this is syslinux loading the ram image, that is slower than network boot!

Anyway, I have cut down the boot time considerably now, using the localboot feature. It doesn't have to wait for the PXE bootrom to start up, do dhcp discovery, load the kernel / ramdisk image, etc. before starting minimyth..

/ Thomas

Post Reply