Image for local boot

Help with using MiniMyth's build system

Moderator: Pablo

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

Image for local boot

Post by Spulit »

Hi,

Is it possible to get MM to completely boot locally? I tried to adapt one of versions of the generated images (RAM, NFS) in order to have the whole filesystem on a local disk and boot from there but with no success. Is there any way to do this?

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

Post by Pablo »

Yes, it is possible to local boot <http>. However, this results in the complete file system being loaded into RAM.

Right know the NFS, CRAMFS and SQUASHFS are compiled into the kernel. Therefore, if you want to do something other than loading the entire file system into memory, you will either need to create an initrd with the appropriate file system driver (MniMytn include EXT3, Windows file systems (FAT, VFAT, and MSDOS) and CD/DVD file formats.) or compile the appropriate file system driver into the kernel.

Once that is done, you should be able to follow the directions for creating a NFS root directory except create it on a local disk partition.

After that you will need to create a /boot directory on partition and put the kernel in it.

Finally, you will want a separate partition labeled 'minimyth' in which you will put you read-only and read-write minimyth configureation directories.
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

Post by Spulit »

Hi Pablo,

Of course, I don't want the filesystem in RAM. I was trying the way you suggested by adapting the NFS image. However, I was trying to avoid an initrd and simply enable all the necessary support in the kernel and just add root=/dev/sdaX to the boot line. I tried that in a virtual machine (VMWare) and didn't work (kernel panic. the kernel was unable to mount the partition). Can you provide me more info on how to make a working initrd for MM?

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

Post by Pablo »

I do not know of any way to create an initrd for MiniMyth. I suspect the easiest thing for you to do would be to build MiniMyth from source using a kernel config that compiled drivers into the kernel rather as modules. You could start with the kernel config that is in the MiniMyth build system, copy it to your $HOME/.minimyth/ directory, edit it to change the drivers from =m to =y (with the exception of sound drivers as they will be replaced by the out-of-tree drivers) and tell the build system to use it by setting mm_KERNEL_CONFIG in your $HOME/.minimyth/minimyth.conf.mk file.

MiniMyth is designed for network boot with the entire image loaded in RAM. The image takes 92M of memory, which costs very little. In addition, it makes it easy to change MiniMyth versions.

I added support for NFS network boot in order to ease my MiniMyth development. It required very little change. Since I added it, I made it available to others.

I added support for local boot because I needed to use it once on a network where I did not have control the DHCP server. It required very little change because even though it boots locally, it loads the entire image into memory. Since I added it, I made it available to others who had the same problem.

For the more traditional booting that you want, there are good alternatives to MiniMyth. Is there some reason that you do not use one of them?
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

Post by Spulit »

Pablo, there are NO alternatives to Minimyth!! MM is simpy great! I recompiled the kernel with all the necessary support (I suppose...) and also tried with an initramfs. I was able to load the kernel and the initram image, but then I do not know how to mount the disk partition and continue booting from there, where the NFS image is located. I will try a bit more and check if the kernel is really detecting the disk and the partition on VMWare. I guess so, since I was already able to get MM running on a virtual machine with a MM RAM image.

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

Post by Pablo »

Spulit wrote:Pablo, there are NO alternatives to Minimyth!! MM is simpy great! I recompiled the kernel with all the necessary support (I suppose...) and also tried with an initramfs. I was able to load the kernel and the initram image, but then I do not know how to mount the disk partition and continue booting from there, where the NFS image is located. I will try a bit more and check if the kernel is really detecting the disk and the partition on VMWare. I guess so, since I was already able to get MM running on a virtual machine with a MM RAM image.

Thanks!
Are you booting from a ATA/SATA disk or a USB disk?

By compiling USB support, SCSI disk support and ext3 support into the kernel, I was able to boot from a USB flash drive using the NFS image installed on the flash drive.

By the way the NFS image is in the download directory with the RAM image.
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

Post by bowmo »

I'm also looking into doing a local boot, main reason for this is boot time! It takes too long for my board to do bootp discovery to get an IP address, and then to load the image to memory.

My initial thought was also to take the NFS image, and convert it to local boot. I'm thinking along the line of mounting the root as RO, and have all the configuration done from the server, so the conf. is still in a central location on the network.

All is done in order to increase the WAF/KAF of minimyth.

For an even faster boot-from-scratch, I have thought about implementing tux-on-ice in a kiosk mode, and maybe changing the bios on my epia board for coreboot.

/ Thomas
(KAF = Kidds Acceptance Factor)
Pablo
Site Admin
Posts: 4182
Joined: Tue Dec 14, 2004 2:13 am
Location: La Jolla
Contact:

Post by Pablo »

Local boot is supported already. What is not supported is local boot without loading the root file system into memory. That is, the kernel and initrd based root file system are stored on the local disk but both must be loaded into memory.
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

Post by bowmo »

The problem with the current local boot concept, is that it takes time to load the disk image to ram.

So I wan't to skip the load-in-to-ram step, just having everything on an EXT3 partition.

Anyway, this is not going to happen the next couple of months. With a newborn son, and summer comming up, I have my hands full.

/ Thomas
jamat13
Member
Posts: 11
Joined: Tue May 12, 2009 3:30 am

Re: Image for local boot

Post by jamat13 »

Here they keep the squashfs in RAM. https://wiki.ubuntu.com/BootToRAM
James
mcine
Member
Posts: 10
Joined: Fri Dec 05, 2008 10:11 am

Re: Image for local boot

Post by mcine »

Hey,

I have beed having hard time with mblast remote. The system becomes really unstable when I use it.
I would like to muild my own image and try it out. I use local boot at the moment (cf2ide adapter and cf-card).
I have no control over dhcp server, so what is the best way to use custom build ?
I dont think I should try to make my own local installation, but could configure minimyth, just to boot from CF and then retrieve the image from server ? I was thinking using MM_MINIMYTH_BOOT_URL parameter for that but the documentation seems to talk only about the configuration files in that case.

Or what would be the easiest way ? I have limited time to do these so not really keen on studying lots of stuff.
mcine
Member
Posts: 10
Joined: Fri Dec 05, 2008 10:11 am

Re: Image for local boot

Post by mcine »

Hey,

I got my image to CF using the mm_local_install script and gave it the image dir as a parameter. I had to manually copy the conf directory tho. Might also work by changing the url in the script to local web server which contains the dir.

Was almost too easy 8)..

Only bad thing is that it did not help and my mplay still do not work well. Well .. Maybe I have to buy mce-remote.
Spulit
Contributor
Posts: 181
Joined: Tue Dec 30, 2008 5:54 pm

Re: Image for local boot

Post by Spulit »

Hi,

As I said in my previous post in this thread, I was able to do local boot using the NFS image without loading the root filesystem to RAM! I just needed Extlinux as boot loader and in the kernel append line I have just added root=/dev/XXX. The contents of rootfs.tar.gz in the NFS image is the root filesystem that should in the local disk.
Post Reply