You are not logged in.

#1 2010-11-18 00:10:50

Ryujin
Forum Fellow
From: Centerville, Utah
Registered: 2005-05-12
Posts: 246
Website

[Solved] Ramdisk Booting, where to start?

I am trying to boot a server into Arch with a ramdisk, basically I want to pxeboot Arch and then download the install image from a local server, mount / on a tmpfs and unpack the root image onto /. I have it working with Ubuntu but I am not quite sure where I should start with Arch. It looks like I will need to create an initcpio image with a hook that downloads the root image and creates the tmpfs.
I guess my question is, in a hook that creates a tmpfs for a root filesystem, where should I mount the root filesystem, and how early do I need to place the hook?

Thanks

Last edited by Ryujin (2010-11-20 04:13:10)

Offline

#2 2010-11-18 06:39:22

Ryujin
Forum Fellow
From: Centerville, Utah
Registered: 2005-05-12
Posts: 246
Website

Re: [Solved] Ramdisk Booting, where to start?

I got it, the root filesystem is mounted by the default_mount_handler() function in init_functions, and the location of the root filesystem is passed to the function. The default_mount_handler() is called in the init script and passed the argument /new_root and then the init script runs switchroot onto /new_root.

So to change what the root fs will be, just overwrite the default_mount_handler() function.

Offline

Board footer

Powered by FluxBB