You are not logged in.

#1 2024-03-22 12:54:57

ykonstant
Member
Registered: 2020-01-07
Posts: 19

Testing installation in external SSD with BIOS MBR mode

Hello all;

I needed to update the OS in an older Dell laptop that boots in BIOS mode, and wanted to do so by hosting the OS on an external SSD and boot from there.

Thus, I installed a fresh Arch system on an external SSD following the normal instructions:

----------------
I created two partitions: a FAT32 "/boot" partition with fdisk code "ea" with the syslinux bootloader installed via "extlinux", and an ext4 root partition where I pacstrap'd the basic packages.

The boot partition is properly marked bootable, and I copied the syslinux MBR code as per the instructions:

# dd bs=440 count=1 conv=notrunc if=/usr/lib/syslinux/bios/mbr.bin of=/dev/sda

I copied the basic .c32 files to the /boot/syslinux folder, and I edited the cfg file APPEND directives to

root=UUID=uuid-of-the-root-partition

I also created a swapfile and added it to the /etc/fstab file.
----------------

Unfortunately, I have been unable to boot from that drive on my current laptop (Thinkpad P53), which has a greyed-out [legacy] boot mode, and is on UEFI only.  I have disabled secure boot but still cannot boot to legacy mode.  There is a note saying "kernel DMA protection" which I don't understand.

So now I have a bootable(?) external SSD that I cannot test in my current machine.  I thought about testing it with virtualbox: create a new virtual machine and try to boot that SSD from that machine.  However, I could not find a way to boot a physical drive through virtualbox.

So my questions are:

1) have I made a mistake or skipped a step in the installation/bootable disk making process?

2) If not, is there a way to tell a virtualbox virtual machine to boot from this external SSD?

3) If not, is there a way to boot this BIOS hard drive from my Thinkpad/switch between UEFI and Legacy boot, or switch to both UEFI + Legacy boot, or is this not a possibility in the P53?

Thank you in advance!

Last edited by ykonstant (2024-03-22 12:55:50)

Offline

#2 2024-03-27 10:51:38

ua4000
Member
Registered: 2015-10-14
Posts: 421

Re: Testing installation in external SSD with BIOS MBR mode

Hi, sorry, on syslinux I can't help.

But grub can be installed to provide both ways,
https://wiki.archlinux.org/title/GRUB/Tips_and_tricks
-->Install to external USB stick
-->UEFI and BIOS installation
Make sure, you have the efi system partiton as 1st one on the drive.
And you need some luck with your BIOS/UEFI, 100% success is not guarantied on every hardware.

Also read
https://wiki.archlinux.org/title/Mkinitcpio
about keyboard    HOOK, or use the fallback  initial ramdisk during boot in case of issues.

Offline

#3 2024-03-27 11:23:53

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,972

Re: Testing installation in external SSD with BIOS MBR mode

1. no

2. there are ways to boot virtualbox from a physical drive, but they tend to be tricky. treat it as a last resort.

3. Maybe.

Kernel DMA protection is a (windows-focused) firmware security setting.

boot mode button is grey and cannot be configured - thinkpad T490 shows where to look for the option.

Hopefully that gives enough info to disable 'kernel dma protection' on your lenovo .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#4 2024-04-17 10:25:03

CommanderCortex
Member
From: Auckland
Registered: 2023-12-30
Posts: 2
Website

Re: Testing installation in external SSD with BIOS MBR mode

You can always use qemu if you're on Linux, Which will make booting into grub easy & setup drive pass through or if you're on windows use Hyper-V; boot you may need to setup an efi file like this:

arch-chroot /mnt pacman -S efibootmgr --noconfirm

arch-chroot /mnt efibootmgr --disk /dev/sda --part 1 --create --label "Linux Kernel" --loader /vmlinuz-linux --verbose \ --unicode 'root=PARTUUID=(DRIVE UUID HERE) rw initrd=\initramfs-linux.img'

Last edited by CommanderCortex (2024-04-17 10:25:46)


chris@arch ~ >

Offline

#5 2024-04-22 13:02:36

EmanueleVR
Member
From: Tuscany
Registered: 2024-04-22
Posts: 2
Website

Re: Testing installation in external SSD with BIOS MBR mode

ykonstant wrote:

Hello all;

I needed to update the OS in an older Dell laptop that boots in BIOS mode, and wanted to do so by hosting the OS on an external SSD and boot from there.

Thus, I installed a fresh Arch system on an external SSD following the normal instructions:

----------------
I created two partitions: a FAT32 "/boot" partition with fdisk code "ea" with the syslinux bootloader installed via "extlinux", and an ext4 root partition where I pacstrap'd the basic packages.

The boot partition is properly marked bootable, and I copied the syslinux MBR code as per the instructions:

# dd bs=440 count=1 conv=notrunc if=/usr/lib/syslinux/bios/mbr.bin of=/dev/sda 

I copied the basic .c32 files to the /boot/syslinux folder, and I edited the cfg file APPEND directives to

root=UUID=uuid-of-the-root-partition

I also created a swapfile and added it to the /etc/fstab file.
----------------

Unfortunately, I have been unable to boot from that drive on my current laptop (Thinkpad P53), which has a greyed-out [legacy] boot mode, and is on UEFI only.  I have disabled secure boot but still cannot boot to legacy mode.  There is a note saying "kernel DMA protection" which I don't understand.

So now I have a bootable(?) external SSD that I cannot test in my current machine.  I thought about testing it with virtualbox: create a new virtual machine and try to boot that SSD from that machine.  However, I could not find a way to boot a physical drive through virtualbox.

So my questions are:

1) have I made a mistake or skipped a step in the installation/bootable disk making process?

2) If not, is there a way to tell a virtualbox virtual machine to boot from this external SSD?

3) If not, is there a way to boot this BIOS hard drive from my Thinkpad/switch between UEFI and Legacy boot, or switch to both UEFI + Legacy boot, or is this not a possibility in the P53?

Thank you in advance!


1) For the Legacy/CSM installation everything is fine if you followed the guide:

https://wiki.archlinux.org/title/Syslinux#Manually

2) As for virtualbox at the moment I don't have simple ideas, but you can certainly clone everything from the SSD to a VirtualBox virtual HDD

3) While for Legacy/CSM on BIOS follow as written in this lenovo forum which I leave you below.
To boot legacy/CSM you will have to disable Kernel DMA protection.
To turn off Kernel DMA protection had to go to Security>Virtualization>Kernel DMA Protection---turn off

https://forums.lenovo.com/t5/ThinkPad-P … -p/5000885

Offline

Board footer

Powered by FluxBB