Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Feasible Concept? Booting to local RAM Filesystem
2013-07-24, 19:07
Post: #1
Feasible Concept? Booting to local RAM Filesystem
I'd like some help to validate a general concept for PXE... am I heading down a feasible path here?

My goal is to have a system boot quickly via iPXE, run independently (local file system), and run entirely from RAM. The application is for burn-in testing of new systems. We need full access to the local disks to beat them up, swap them out, etc. A small-ish memory footprint would be nice-to-have because we also need to exercise RAM.

I've found processes for installing to local disk via PXE, and PXE-booting diskless workstations from an NFS share. This fellow seems to be the closest, apparently installing CentOS from an ISO to a RAM filesystem:
http://blog.braastad.org/?p=160
Now, I understand that PXE booting an ISO takes like 2x the RAM due to initrd, and doing a kickstart install vs. copy would seem like a much slower boot process. But, maybe his approach is the best option?

Is it conceptually feasible to combine some of these concepts? E.g., the NFS-based approach, adding in a copy-to-ramfs step and booting it locally? I'm wondering how the RAM filesystem would survive the boot, with a new kernel taking over.

FWIW, here's Redhat's approach for NFS-based booting:
https://access.redhat.com/site/documenta...stems.html

The appeal of their "diskless" approach is that I expect the boot time to be faster than a kickstart installation. And it'll be very easy for others to make changes to the source filesystem after I get it working (i.e., no ISO rebuilds). The drawback is this has an ongoing dependency on the NFS server, so I'd like to move the filesystem into local RAM. (The NFS server itself will be a test node at points, so won't always be online.)

Is it conceptually possible to PXE boot from NFS, copy the filesystem, and "remount" the root at the RAMdisk instead? Or PXE boot to an interim OS, create/populate the RAM filesystem, then boot the CentOS6 kernel from within it?

Thanks,
Richard
Find all posts by this user
Quote this message in a reply
2013-07-24, 23:26
Post: #2
RE: Feasible Concept? Booting to local RAM Filesystem
OK, so digging deeper, it seems like Espen's solution (above) is almost what I'm looking for - I think his kickstart is just for building the ISO, and the ISO is used to boot the OS and move it into the RAM filesystem.

Now, I'm not a Linux whiz (clearly!) so I can't gauge whether it'd be possible to cut out the ISO step, and do essentially the same thing but via HTTP or NFS, and then resume with the booting-from-RAM step. I'll do the homework here, but I'm hoping someone can tell me "yeah, this could work", or "no, there's a show-stopper". (Like, does iPXE-booting from ISO provide a unique option to switchover to the RAM filesystem, where doing the same via HTTP or NFS wouldn't?)

Thanks,
Richard
Find all posts by this user
Quote this message in a reply
2013-07-25, 12:07
Post: #3
RE: Feasible Concept? Booting to local RAM Filesystem
How about using iSCSI ?
Find all posts by this user
Quote this message in a reply
2013-07-25, 12:52 (This post was last modified: 2013-07-25 13:19 by robinsmidsrod.)
Post: #4
RE: Feasible Concept? Booting to local RAM Filesystem
If there is a requirement to be totally without network connectivity once the ramdisk/OS is loaded, then I'd go with the approach SystemRescueCD uses. They have a kernel+initrd that is loaded via normal means, and then they have a squashfs that can be loaded via http, nfs or other network method. If you use http I believe it is completely held in ram, if you use NFS then I think it's just mounted directly.

If you just need a stability test tool, there is already one called "Breakin" which runs completely from an initrd, so once it's booted it doesn't require any local storage or network access.

I am in the process of trying to make custom kernel+initrd myself for a specific purpose, and I'm trying to figure out the easiest way to make one for a specific purpose. So far the suggestions I've found focus on either copying what OpenELEC has done (bash-scripting based approach) or using buildroot (make-based approach) or genkernel, from gentoo (which is what systemrescuecd uses, I think). Please do tell me if you find a simpler way to build a custom ramdisk-based solution. I'm primarily a Ubuntu fan myself.

What I had in mind was the ability to run from my local linux workstation some commands to debootstrap a minimal system, install the interesting .debs into this chroot, add whatever config and other files on top of this, and package it all into a kernel+initrd you can netboot straight into memory. Overall that should mean building a completely custom system to run in memory is just a matter of tweaking this script and you should have it.
Visit this user's website Find all posts by this user
Quote this message in a reply
2013-07-25, 18:17
Post: #5
RE: Feasible Concept? Booting to local RAM Filesystem
Once booted, I will still need network connectivity - both for central control of the testing, and also to test networking. I'm just trying to remove external dependencies. We've got a fairly specific set of tests that we need to run, as well as megacli settings to configure the RAID controller specifically, so I think rolling our own is probably necessary to keep it self-contained.

The link I posted looks like it'll get me 90% of where I want to be, and I'm probably best served by cloning his method to start, and then resuming the search.

Why do I even care about cutting the ISO out of the process? Two reasons... First, to reduce the RAM footprint; this is based purely on my readings that initrd booting an ISO ends up doubling the size of the filesystem in RAM. But also because I want every node to act as a boot server for subsequent nodes - if I need to serve up an ISO, that's yet a third copy I need to keep in RAM. But if I can serve up the working filesystem, I only need to have one copy locally.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 2 Guest(s)