maxnet / berryboot

Berryboot -- Boot menu / OS installer
http://www.berryboot.com/
Other
799 stars 135 forks source link

Removing an image from BB to boot independently needs expansion #725

Open robenorman opened 2 years ago

robenorman commented 2 years ago

This relates to closed item #130 which was helpful but insufficient to extract my ubuntu install from berryboot.

Background: I have a pi 4 and selected berryboot initially because the noobs doesnt have 64 bit on it. I needed to extract ubuntu from berryboot because I wanted to use kubernetes which does not have a storage driver for squashf which berry boot uses. I found berry boot great to experiment with various os's. For ubuntu I did have to select btrfs to get it to work.

Issue #130 was very helpful in extracting the OS. However there are several things not mentioned that hit me.

1). You need to copy cmdline.txt and config.txt commenting out the berryboot specific image load line. You also need to select the kernel avaliable from the site where you downloaded the boot from specific to your pi so in my config.txt I have: # Berryboot settings, do not change #initramfs bbloader.img

[pi4] # 64-bit stuff for Pi 4 kernel=kernel8.img arm_64bit=1

2). You MUST edit your fstab. You cant keep the effectivel empty fstab. I was booting from the USB and my fstab now looks like: # UNCONFIGURED FSTAB FOR BASE SYSTEM /dev/sda2 / ext4 defaults,x-systemd.growfs,rw 0 0 #/swapfile none swap sw 0 0 /dev/sda1 /boot/firmware vfat defaults 0 1 Possible better to use USB UUID but this worked for a USB device plugged into the top hightspeed USB port with nothing in the bottom. You have to have rw in there - which to be fair #130 talked about 3). If you are booting from USB you MUST add root= to the cmdline. Mine looks like: console=ttyAMA0,115200 console=tty1 root=/dev/sda2 fstype=ext4 elevator=deadline rootwait quiet 4). This got my system to boot gnome but I was seeing some errors in the boot and my wifi mysteriously disappeared. It transpires that you cannot ignore the rest of the stuff from the firmware site. You have to copy the module files to your /lib/modules (use tar to keep file attributes). You need to select the directory that is specific to the kernel you loaded. so for me this was. 5.10.78-v8+ (got that from https://forums.raspberrypi.com/viewtopic.php?t=275740 )

Two further things. The firmware repo is 20Gb and on my 20Mbs line it wasnt fun. You can set --maxdepth to 1 on your git clone command to make it a reasonable size.

Now its working fine but two days of blood sweat and tears. Posting this to save others.

symbios24 commented 2 years ago

I donr think anyone will bother to go in this crazy process