1

I would like to boot a Live Linux CD, without needing the CD. Take for example GParted or CloneZilla. Which I periodically boot off their Live CD. But I would like to eliminate the use of the CD/DVD media because it is slow, noisy, and error prone (scratches on the disc). I would prefer to load these tools from the harddisk of my service/repair PC, which I am dualbooting between Win7 (NTFS) and FreeBSD (UFS2) using Grub2.

I have already Googled enough to learn that booting ISO images is not working well (and I also understand why), and the way to do this is to extract the contents of the Live CDs and boot those files directly.

Here is what I managed so far:

  • Copy the files from inside the ISO image to a folder on the UFS2 partition.
  • Translate the Live CD's isolinux menu entries to a grub2 submenu.

When I select one of the submenu items at system startup time, the entry starts booting, but after some promising output on the screen it starts to spit out the same disappointing message multiple times.

modprobe: module unknown not found in modules.dep

I am pretty certain about where and why it fails. But I don't know the architecture and inner workings of these Live Linux builds enough to take the next step. And my websearch on this was not giving me useful results.

As an actual example, I will use the files from the GParted Live CD here. The relevant ones are:

  • filesystem.packages
  • filesystem.squashfs
  • initrd.img
  • vmlinuz

These I have placed under /boot/Gparted/live/ on my UFS2 partition ada0s2a ("hd0,msdos2,bsd1" in grub2 terms).

The grub2 entries I assembled from the syslinux entries of the Live CD are ...

menuentry "GParted Live" {
  insmod part_msdos
  insmod ufs2
  set root=(hd0,msdos2,bsd1)
  linux /boot/Gparted/live/vmlinuz boot=live config noswap ip=frommedia nosplash
  initrd /boot/GParted/live/initrd.img
}

and the "GParted Live (to RAM)" entry with all the same lines except for

  linux /boot/GParted/live/vmlinuz boot=live config noswap noprompt toram=filesystem.squashfs ip=frommedia nosplash

It seems to me that the filesystem.packages file is not mentioned in these entries. And again, I don't know how the Linux booting process is supposed to work here, but I am convinced that the issue I experience is because the loaded kernel+initrd is trying to use data held within the filesystem.packages or filesystem.squashfs images and it does not find them.

To solve the problem, I should help the kernel by telling it where these image files are. The QUESTION is, how do I do that? Where do I do that?

Reference to the filesystem.packages might be inside the initrd.img somewhere. And I can use gunzip and cpio to extract the contents of that image file. But I still don't know what to look for. And also, I am not convinced that a loaded linux kernel+initrd.img will have access to files on my UFS2 (non Linux) filesystem. Maybe I should place the files on a separate Ext2 partition.

Suggestions, explanations, and pointers are welcome!

1

SOLUTION FOUND!

The GParted Live on Hard Disk page describes very well what one needs to do in order to boot GParted Live from files copied to a folder on the hard disk. I also found some other questions here on SuperUser similar to my question. And I found references to

http://www.kernel.org/doc/Documentation/kernel-parameters.txt

and

https://www.kernel.org/doc/Documentation/x86/boot.txt

which are both excellent documents of their own subject, but were proven to be completely useless for my problem. First, because they contain far too much details to read through, and second, because the arguments I was looking for were NOT included. Hence I deliberately show them here not-as-a-link but as text only.

A couple of important details to note:

  • The Live system could NOT BOOT properly if the files were on my UFS2 partition because the Debian based GParted image cannot access ufs filesystems. This is in contradiction with the fact that when I boot the actual Live CD and open an XTerm, I always could mount my UFS2 partition. Apparently, this ufs handling capability comes at a later stage of the booting process.
  • The Live system CAN boot properly however, if the files are on my NTFS partition. So I did not need to create a separate linux-friendly Ext2, Ext3, Ext4 or FAT partition. I could just use the other (Win7) partition of my dual-boot config.
  • The "GParted Live on Hard Disk" page includes an alternative solution, making grub2 to mount the actual ISO image as a loop device and then booting from that. This possibility was very much to my liking, but I never managed to get it working.
  • The actual way I got everything working was very easy after reading the "GParted Live on Hard Disk" page, took less than 5 minutes. And I applied that to my existing gparted-live-0.16.1-1-i486 version which I downloaded quite some time ago. Once everything was working the way I wanted, I tried the same method with the latest (at the time of writing, 2016-MAY-25) gparted-live-0.26.0-2-i686 version (used the ZIP because I could not mount the ISO), but this keeps failing to properly boot. JUST SAYING! So you may need to try multiple versions to get a working solution.

HERE IS WHAT WORKS:

The four files from the GParted ISO (or ZIP) mentioned in my original post copied to a /GParted/ folder on my NTFS partition. You can name your folder anything you want, just remember to refer to that exact name later. Then create a grub2 menu entry like this:

menuentry "GParted Live" {
  insmod part_msdos
  insmod ntfs
  set root=(hd0,msdos1)
  linux /GParted/vmlinuz boot=live config union=aufs noswap noprompt ip=frommedia live-media-path=/GParted bootfrom=/dev/sda1 toram=filesystem.squashfs
  initrd /GParted/initrd.img
}

Hopefully, this will now help others to solve similar issues!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.