Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 6963  / 3 Years ago, tue, august 24, 2021, 12:22:00

The thing I'm trying to do:




  1. Make a bootable USB with two partitions (bootable FAT32 and NTFS for data). (DONE)

  2. Install GRUB2 to FAT32 partition. (DONE)

  3. Make FAT32 partition multiboot, with persistent installed Ubuntus.



The last one shouldn't be that hard, but now my head is about to blow... I can't find anywhere step-by-step instructions on how to do persistent installation of Ubuntu on one partition and not in the root directory (in ubuntu12.04 folder for example). At this time I've gathered information from it looks like all internet and here what I've done:




  1. Extracted Ubuntu 12.04 LiveCD ISO into /ubuntu12.04 directory.

  2. Created /ubuntu12.04/casper-rw file using dd and mkfs.ext2 it.

  3. Added menuentry to grub.cfg:



    menuentry "Run Ubuntu 12.04.2 Live" {
    linux /ubuntu12.04/casper/vmlinuz file=/ubuntu12.04/preseed/ubuntu.seed boot=casper persistent rw quiet splash --
    initrd /ubuntu12.04/casper/initrd.lz
    }



But result are always the same:



(initramfs): Unable to find a medium containing a live file system.


Where should I place casper-rw file to make initramfs find it?
Or anything to get what I need.


More From » grub2

 Answers
3

For Ubuntu 12.04.2, the kernel is /casper/vmlinuz.efi. Notice the .efi was added in recently.



Also, you don't need to extract the CD files, you can boot directly from the .iso. Here's a template I use for USB multiboot:



menuentry "YOUR TITLE" {
insmod ntfs
insmod iso9660
loopback loop /distros/FILENAME.ISO
linux (loop)/casper/vmlinuz.efi persistent boot=casper iso-scan/filename="/distros/FILENAME.ISO" noeject noprompt splash toram --
initrd (loop)/casper/initrd.lz
}


This way I can keep all distros/versions as their pristine .iso files in a /distros directory inside the NTFS data partition. Grub2 is installed to the MBR, and its /boot files (including the above handwritten /boot/grub/grub.cfg) also in the data partition. Grub2 was installed as:



sudo grub-install --no-floppy --root-directory="/PATH/TO/MOUNTED/USB" "/dev/sdX"

[#30188] Tuesday, August 24, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
njuash

Total Points: 402
Total Questions: 125
Total Answers: 98

Location: Jersey
Member since Sun, Dec 4, 2022
1 Year ago
njuash questions
Wed, Jun 8, 22, 11:53, 2 Years ago
Wed, Nov 30, 22, 11:42, 1 Year ago
Mon, May 30, 22, 04:33, 2 Years ago
Mon, Apr 10, 23, 03:40, 1 Year ago
;