You are not logged in.

#1 2014-12-08 01:09:25

karm
Member
From: Cracow / Poland
Registered: 2011-01-25
Posts: 9

[SOLVED] New arch install from Virtualbox cannot boot on real hardware

Hi,

I'm trying my luck with installing Arch on physical disk through Virtualbox. I followed Wiki and managed to install system on the disk. However, I am unable to boot it outside VM.

I have two physical disks - /dev/sda and /dev/sdb. I have installed Arch on /dev/sda1. It is there, I can see the files from my current OS and it does work in VM. /dev/sda1 is bootable.

However, when I boot my PC from /dev/sda rootfs fails to load kernel image - it says it can't be found. I tried specifing init path in Syslinux.cfg using /dev/sdxX and UUID and even PARTUUID but none worked. When in rootfs, I lsed /dev/disk/by-uuid and found that rootfs sees only one of my two disks, /dev/sdb. I find it really strange.

I followed below advise found on forums:
- Verify that mkinitcpio.conf lists "block" hook
- Create a new kernel image with mkinitcpio -p linux
- Refer to your partition by UUID
- If above doesn't work, try PARTUUID

None of these worked. I believe the reason for this is that the issue is not with how I reference the disk nor how the mkinitcpio works but with the disk not being available for rootfs at all. Alas, I have no experience with disks other than simple partitioning, so I'm not sure where to start.

Fdisk output:

Disk /dev/sda: 931,5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x99ea4d63

Device     Boot      Start        End   Sectors   Size Id Type
/dev/sda1  *          2048  314779647 314777600 150,1G 83 Linux
/dev/sda2        314779648 1153640447 838860800   400G 83 Linux
/dev/sda3       1153640448 1157834751   4194304     2G 82 Linux swap / Solaris

Disk /dev/sdb: 465,8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x75a6998e

Device     Boot     Start       End   Sectors  Size Id Type
/dev/sdb1  *         2048    616447    614400  300M 83 Linux
/dev/sdb2          616448 210331647 209715200  100G 83 Linux
/dev/sdb3       210331648 241788927  31457280   15G 83 Linux

Any ideas? Suggestions and help will be appreciated!

Last edited by karm (2014-12-08 03:56:35)

Offline

#2 2014-12-08 02:31:09

ackt1c
Banned
From: Visalia, California
Registered: 2012-10-10
Posts: 241

Re: [SOLVED] New arch install from Virtualbox cannot boot on real hardware

Export

Last edited by ackt1c (2022-11-05 13:10:38)

Offline

#3 2014-12-08 03:03:11

karm
Member
From: Cracow / Poland
Registered: 2011-01-25
Posts: 9

Re: [SOLVED] New arch install from Virtualbox cannot boot on real hardware

ackt1c wrote:

Covered here
https://wiki.archlinux.org/index.php/Mo … ut_of_a_VM

Please share you're proposed schema.

Either way it looks like your asking for trouble, but great question I'd like to see this solved.

How come I missed that article? Thanks a lot for pointing me in the right direction. It's really late here so I will follow up Tomorrow.

Last edited by karm (2014-12-08 03:50:24)

Offline

#4 2014-12-08 03:56:19

karm
Member
From: Cracow / Poland
Registered: 2011-01-25
Posts: 9

Re: [SOLVED] New arch install from Virtualbox cannot boot on real hardware

Sleep is for the weak.

So I've read that article and found what the issue was.

Turns out I automatically followed previous advise without giving it some thought and run mkinitcpio from Virtualbox. Which does not make sense because the whole point of this is to prepare kernel image to run on other hardware than provided by VM. So what I did to fix this:

1. Installed arch-chroot on VM
2. Mounted /dev/sda1 on my host machine and chrooted into it using arch-chroot
3. Run mkinitpcio -p linux
4. Reinstalled boot loader just in case with syslinux-install_update -iam /dev/sda1
5. Adjusted /boot/syslinux/syslinux.cfg to work with new configuration:
  5.1 set root=UUID=..... to be certain it picks the right partition
  5.2 add proper systemd init path APPEND=/usr/lib/systemd/systemd

And it does work - I'm posting from my new shiny system. Thanks a lot ackt1c!

Offline

Board footer

Powered by FluxBB