Hey guys, I need your help for (I know it’s unsupported) booting batocera-x86_64-vv-dddddddd.img
(gUnzipped) via GRUB.
I really hope that some kind soul is willing to give me a hand! 🧡
I feel I’m so close to the solution!! ⚡
Why not the Ventoy way?
Well, because:
- I dont’ want an USB port to be occupied by BatoceraUSB
- Due to lack of space, I cannot and neither do I want to take the risk of messing up partitions
- I need the main OS to be operational and easily accessible
My HDD layout is composed like this:
TABLE: GPT
1st GPT partition: /dev/sda1
2nd GPT partition: /dev/sda2
3rd GPT partition: /dev/sda3
Partitions:
/: /dev/sda2 [ext4, ROOT]
/boot/efi: /dev/sda1 [fat32, ESP]
swap: /dev/sda3 [linux-swap, SWAP]
ArchLinux is installed on /dev/sda2
and GRUB2 on /dev/sda1
.
Directory structure:
/bin
/bato/
bato.img
/boot/
efi/
/dev
/etc
/home
## [...]
## truncated output
## [...]
I’ve already expanded BATOCERA partition:
$ sudo qemu-img resize /bato/bato.img +8G
$ sudo losetup --find --show /bato/bato.img.img
loop0
├─loop0p1 vfat FAT32 BATOCERA ABCD-1234
└─loop0p2 ext4 1.0 SHARE 12345678-abcd-1234-abcd-0123456789ab
So far I have been able to start the kernel (partition1[vfat]/boot/linux
), but it then fails booting.
Here’s the steps I’m trying at GRUB’s console:
grub> loopback bato (hd0,gpt2)/bato/bato.img
grub> probe --fs-uuid (bato,gpt1)
ABCD-1234
grub> probe --label (bato,gpt1)
BATOCERA
grub> insmod cpio
grub> insmod fat
grub> insmod gzio
grub> insmod part_gpt
grub> insmod part_msdos
grub> linux (bato,gpt1)/boot/linux root=UUID=ABCD-1234 label=BATOCERA loglevel=9
grub> initrd (bato,gpt1)/boot/initrd.gz
grub> boot
At this stage linux
is correctly loaded, but immediately fails because of this:
Waiting for the root device
LABEL=BATOCERA: Can't open blockdev
LABEL=BATOCERA: Can't open blockdev
LABEL=BATOCERA: Can't open blockdev
LABEL=BATOCERA: Can't open blockdev
LABEL=BATOCERA: Can't open blockdev
mount: mounting LABEL=BATOCERA on /boot_root failed: No such file or directory