mmatuska / mfslinux

Minimalist in-memory diskless Linux distribution based on OpenWrt
GNU General Public License v3.0
57 stars 17 forks source link

Booting mfslinux from a pre-partitioned HD #4

Open Intensity opened 5 years ago

Intensity commented 5 years ago

@mmatuska I'm wondering what the most straightforward way is to build an mfslinux image then install it to a hard drive that's already pre-partitioned. This partition has sufficient space to hold the mfslinux image; it's just that a dd to the raw device would overwrite the existing partition table.

Would I use a chainloader, like grub, installed to the first sector(s) of /dev/sda with second stage install to some other partition (16MB /dev/sda1 for BIOSGRUB data, then a 128MB /dev/sda2 for the mfslinux image)? Would FreeBSD's chainloading system work here? What about Super Grub Disk?

Perhaps some of these options might require a slight change in the format of the built mfslinux image. My intent is to install to an available HD partition so that the system auto-boots into a mfslinux RAM disk without any user intervention necessary (perhaps upon boot, the options auto time out to boot into the mfslinux image existing on another partition).

Any ideas are appreciated.

mmatuska commented 4 years ago

Technically you need a correctly configured boot loader like GRUB (or even syslinux) and a place to store the vmlinuz and initramfs.igz files.