Frugal install howto?

Forum rules
We don't support installations in VirtualBox, VMWare, qemu or others. We ignore posts about WINE, PlayOnLinux, Steam and Skype. We don't support btrfs, lvm, UEFI, side-by-side installations with GPT or dualboot with anything newer than Windows XP.
Google your problem first. Check the Wiki. Read the existing threads. It's okay to "hijack" an existing thread, yes! If your problem is not yet covered, open a new thread. To get the quickest possible help, mention the exact release codename in your post (uname -a is a good idea, too). Due to the lack of crystal balls, attach the output of lspci -nnk if you encounter hardware problems.
User avatar
daggoth
runs Stable
Posts: 36
Joined: Mon Mar 10, 2014 8:16 am

Frugal install howto?

Unread post by daggoth » Mon Sep 21, 2015 11:03 am

Hi all. I have been trying to boot a few linuxbbq ISOs, but have encountered problems.

To begin with, I downloaded linuxbbq-bork, and installed it to a USB. That went okay, but I have a fairly new laptop with UEFI, and the only way I could get it to boot from liveUSB was to put it into Legacy mode. So yes, I got it to boot, but it was a hassle.

I know there are UEFI-BIOS settings to play with. But basically, I feel the UEFI on this laptop is half-broken. When I switched it back from "Legacy" to "UEFI", my old settings were somehow wiped, and it went back to autobooting Windows. But I will spare you the gruesome details.

So on this laptop, booting from LiveUSB is a hassle. So if I download an ISO, I'd rather do a frugal install, and then boot to it through GRUB.

I hoped that linuxbbq was compatible with "grub-imageboot". By just copying the ISO into /boot/images for my main distro and then running "update-grub2", the new linuxbbq-bork grub entry was added. But when I tried it, nothing happened. So seemingly, it was incompatible.

My second attempt was to add this entry to my main distros /etc/grub.d/41_custom. I wrote this after inspecting the syslinux files in the ISO. And on this occasion, linuxbbq-bork booted, but then stopped. Indeed, I suspect that it couldn't find the initrd? And it is hard to wrangle this stuff further without knowing what all those boot codes mean.

Code: Select all

menuentry "linuxbbq-bork-20150203.iso" {
set isofile="/boot/iso-files/linuxbbq-bork-20150203.iso"
loopback loop (hd0,7)$isofile
linux (loop)/live/vmlinuz verbose boot=live ip=frommedia union=aufs vga=current
initrd (loop)/live/initrd.img
}
So I finally ask, for someone who wants to try a few ISOs without doing a full install, for someone who prefers a good frugal install over using a liveUSB, are there any approved frugal install howtos for linuxbbq? Thanks :-)

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: Frugal install howto?

Unread post by machinebacon » Mon Sep 21, 2015 1:53 pm

Hello,

that's an interesting question, thanks for raising it. I have no experience with UEFI (our spins should actually work on old computers, so that is our first priority)

The boot scripts for live are different from the installed session (/lib/live is the place where live boot scripts are placed), so don't let yourself be fooled :)

It should be possible to create a partition with fdisk, tune2fs it and then simply copy over the extracted squashfs file, chroot into it, and run grub-install there. I would try this in a VM first, btw. Actually the installer does the same, so I am not sure if this makes a difference with UEFI.

So, that is all I can say. Maybe someone else can chime in -- I have not touched a UEFI computer yet.
..gnutella..

User avatar
daggoth
runs Stable
Posts: 36
Joined: Mon Mar 10, 2014 8:16 am

Re: Frugal install howto?

Unread post by daggoth » Tue Sep 22, 2015 1:22 pm

daggoth wrote:And on this occasion, linuxbbq-bork booted, but then stopped. Indeed, I suspect that it couldn't find the initrd?
It turns out that I was wrong. Both the kernel and initrd loaded, and then entered a panic state because it could not find the correct medium containing a live filesystem.
machinebacon wrote:The boot scripts for live are different from the installed session (/lib/live is the place where live boot scripts are placed), so don't let yourself be fooled :)
I guess by /lib/live, you meant within the initrd. Crikey, it is a huge set of scripts in there. After searching, I decided the initramfs was likely the product of initramfs-tools and live-initramfs, where the live-initramfs manpage lists extra boot codes and their usage. Looking at the isoboot/loopback grub entry from my first post, I still haven't found a way to make that work. But I do see two other ways to do a frugal install.

Method 1

The simplest frugal install possible is to mount the linuxbbq ISO file, and copy the files exactly into an empty partition, for example /dev/sda8. The squashfs remains compressed. Then append something like this to /etc/grub.d/41_custom, and update your grub.

Code: Select all

menuentry "linuxbbq-bork-20150203.iso" {
linux (hd0,8)/live/vmlinuz verbose boot=live ip=frommedia union=aufs vga=current 
initrd (hd0,8)/live/initrd.img
}
When booted, the initrd will by default look for any partition with a /live folder, and live-boot into it.

Method 2

The first method works great for just one frugal install. But what if you want to have several concurrent frugal installs? I don't know exactly, but it would becomes less clearcut to the initrd which of several partitions to live-boot. So instead, to keep it things tidy, I propose to install Bork to /boot/frugal/bork, CLit to /boot/frugal/clit, and so forth. Separated folders.

So first, I copy in the contents of the ISO :-

Code: Select all

cd /mnt
mkdir temp
mount -v -o loop linuxbbq-bork-20150203.iso temp
mkdir -pv /boot/frugal/bork
cp -rv temp/* /boot/frugal/bork
Then assuming /boot is on /dev/sda7, I append this to /etc/grub.d/41_custom, then update my grub...

Code: Select all

menuentry "linuxbbq-bork-20150203.iso" {
linux (hd0,7)/boot/frugal/bork/live/vmlinuz verbose boot=live ip=frommedia union=aufs vga=current live-media-path=/boot/frugal/bork/live
initrd (hd0,7)/boot/frugal/bork/live/initrd.img
}
By default, the initrd will always look for a partition with a /live folder to live-boot. But the live-media-path bootcode tells the initrd that it should look for a partition/medium with a /boot/frugal/bork/live folder instead. Such that provided my various frugal installs all have their own unique folders, it should never get confused.

Well, that is all working for me so far. And now I can get to the serious business of trying out a few LinuxBBQ ISOs...

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: Frugal install howto?

Unread post by machinebacon » Tue Sep 22, 2015 2:19 pm

excellent documentation, thanks a lot.
..gnutella..

User avatar
rhowaldt
Dog
Posts: 4565
Joined: Wed Oct 17, 2012 9:01 am
Contact:

Re: Frugal install howto?

Unread post by rhowaldt » Tue Sep 22, 2015 5:32 pm

awesome, thanks for the elaborate explanation daggoth, way to start your BBQ career ;)

i say, time for a motherfucking intro-thread.
All statements are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense.

Post Reply