Adding Support for Memdisk Booting via iPXE #177

Closed
opened 2016-01-30 16:28:28 +00:00 by philm · 10 comments
philm commented 2016-01-30 16:28:28 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: antonym

I run netboot.xyz and would love to add your distribution to the menu. Because it appears that Manjaro is only released in ISO form, I have to rely on memdisk to boot the ISO via iPXE. The issue I'm having is that it's unable to locate the filesystem once the kernel loads up.

I think this could be fixed with a few changes using the method described here. ArchLinux and Antergos Linux have implemented functionality that uses the phram and memdiskfind to locate the ISO in memory and remap that to a mount using mtdblock so that the image can be located and mounted.

Arch Linux examples 1,2

Apologies if this is in the wrong repo or incorrect way to raise the issue. If so let me know and I can raise it at the appropriate place.

Thanks!

https://github.com/antonym/netboot.xyz/issues/43

*Created by: antonym* I run [netboot.xyz](http://netboot.xyz) and would love to add your distribution to the menu. Because it appears that Manjaro is only released in ISO form, I have to rely on memdisk to boot the ISO via iPXE. The issue I'm having is that it's unable to locate the filesystem once the kernel loads up. I think this could be fixed with a few changes using the method described [here](https://www.reversengineered.com/2016/01/07/booting-linux-isos-with-memdisk-and-ipxe/). ArchLinux and Antergos Linux have implemented functionality that uses the phram and memdiskfind to locate the ISO in memory and remap that to a mount using mtdblock so that the image can be located and mounted. Arch Linux examples [1](https://projects.archlinux.org/mkinitcpio.git/tree/install/memdisk),[2](https://projects.archlinux.org/mkinitcpio.git/tree/hooks/memdisk) Apologies if this is in the wrong repo or incorrect way to raise the issue. If so let me know and I can raise it at the appropriate place. Thanks! https://github.com/antonym/netboot.xyz/issues/43
philm commented 2016-01-30 22:26:54 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: philmmanjaro

@antonym: well, Manjaro already supports memdisk. We simply don't use it yet. However you can spin your own edition and enabling that function by adding memdisk to the mkinitcpio.conf file. You can compare it with Arch's mkinitcpio.conf.

*Created by: philmmanjaro* @antonym: well, Manjaro already supports memdisk. We simply don't use it yet. However you can spin your own edition and enabling that function by adding **memdisk** to the [mkinitcpio.conf](https://github.com/manjaro/manjaro-tools-iso-profiles/blob/master/shared/mkinitcpio.conf) file. You can compare it with [Arch's mkinitcpio.conf](https://projects.archlinux.org/archiso.git/tree/configs/releng/mkinitcpio.conf).
philm commented 2016-01-31 05:13:40 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: antonym

@philmmanjaro: Thanks for getting back to me. I generated a net-minimal ISO (manjaro-net-minimal-16.01-x86_64.iso) with memdisk enabled and it worked great booting from iPXE and memdisk over the network. Is enabling memdisk for future releases something you are willing to consider?

Thanks again!

*Created by: antonym* @philmmanjaro: Thanks for getting back to me. I generated a net-minimal ISO (manjaro-net-minimal-16.01-x86_64.iso) with memdisk enabled and it worked great booting from iPXE and memdisk over the network. Is enabling memdisk for future releases something you are willing to consider? Thanks again!
philm commented 2016-01-31 07:17:41 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: philmmanjaro

Well, I can add it to our next release. Let me think about it.

*Created by: philmmanjaro* Well, I can add it to our next release. Let me think about it.
philm commented 2016-01-31 10:51:44 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: udeved

@philmmanjaro

We just need to add the memdisk hook, if pxe_boot is true.
I can add it later tonight.

*Created by: udeved* @philmmanjaro We just need to add the memdisk hook, if pxe_boot is true. I can add it later tonight.
philm commented 2016-01-31 20:21:18 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: philmmanjaro

Ok, fine. would be great.

*Created by: philmmanjaro* Ok, fine. would be great.
philm commented 2016-01-31 20:59:40 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: udeved

I am just not sure if we would need extra switch, or if we can make it default, so all pxe will work with it?

*Created by: udeved* I am just not sure if we would need extra switch, or if we can make it default, so all pxe will work with it?
philm commented 2016-01-31 21:20:08 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: antonym

I tested just adding the memdisk flag by itself and I think all that does is enable the initrd to locate and mount the manjaro.img without having to crack open the ISO. Within iPXE you'd just specify this for the net image for example:

kernel memdisk iso raw
initrd http://sourceforge.net/projects/manjarolinux/files/release/15.12/netinstall/manjaro-net-15.12-x86_64.iso/download

It sounds like the other pxe flags are useful if you decide to crack open the image and access the kernels and manjaro.img directly. My main goal is to just provide a centralized place to boot many operating systems from one menu so being able to point at either the ISO or network installs is what I'm looking for.

*Created by: antonym* I tested just adding the memdisk flag by itself and I think all that does is enable the initrd to locate and mount the manjaro.img without having to crack open the ISO. Within iPXE you'd just specify this for the net image for example: kernel memdisk iso raw initrd http://sourceforge.net/projects/manjarolinux/files/release/15.12/netinstall/manjaro-net-15.12-x86_64.iso/download It sounds like the other pxe flags are useful if you decide to crack open the image and access the kernels and manjaro.img directly. My main goal is to just provide a centralized place to boot many operating systems from one menu so being able to point at either the ISO or network installs is what I'm looking for.
philm commented 2016-01-31 21:24:08 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: udeved

Its more about that we dynamically set mkinitcpio hooks, and I was wandering, if we should just tie pxe_boot to add additional hooks, or if there should be a sub switch for that.

*Created by: udeved* Its more about that we dynamically set mkinitcpio hooks, and I was wandering, if we should just tie pxe_boot to add additional hooks, or if there should be a sub switch for that.
philm commented 2016-01-31 22:03:23 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: philmmanjaro

Add it as you said before. We can always split it up in a later state if needed.

*Created by: philmmanjaro* Add it as you said before. We can always split it up in a later state if needed.
philm commented 2016-02-03 22:36:29 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: antonym

Thanks all!

*Created by: antonym* Thanks all!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
tools/manjaro-tools#177
No description provided.