You are not logged in.

#1 2023-06-28 00:28:37

PlumpyPumpkin69
Member
Registered: 2023-06-27
Posts: 2

Hyper-V won't boot OS after disabling ISO

So far, this is what I've done:

parted /dev/sda
mklabel gpt
mkpart "EFI System" fat32 1Mib 1024Mib
set 1 boot on
mkpart "Linux File System" ext4 1024Mib 100%

mkfs.ext4 /dev/sda2
mkfs.fat -F 32 /dev/sda1
mount /dev/sda2 /mnt
mount --mkdir /dev/sda1 /mnt/boot

pacstrap -K /mnt base linux linux-headers linux-lts linux-lts-headers
genfstab -U /mnt >> /mnt/etc/fstab

arch-chroot /mnt
pacman -S hyperv
exit
systemctl start hv_fcopy_daemon.service
systemctl start hv_kvp_daemon.service
systemctl start hv_vss_daemon.service
arch-chroot /mnt

pacman -S nano
nano /etc/locale.gen
local-gen
echo "LANG=en_US.UTF-8" > /etc/locale.conf
echo "Archie" > /etc/hostname

pacman -S grub efibootmgr
mount --mkdir /dev/sda1 /boot/EFI
grub-install --target=x86_64-efi --efi-directory=boot --bootloader-id=GRUB
grub-mkconfig -o /boot/grub/grub.cfg

I exit chroot, shut down the VM, and disable the ISO, but then it won't load anything at all. Hyper-V tells me it couldn't load an Operation System. I must be missing something, but I'm not sure what. I thought I followed the GRUB article pretty closely. I think. Does anyone have experience setting up Arch in Hyper-V?

EDIT: I should probably give a little more detail. When I reboot the system after making the grub configuration, I disable the ISO in the settings, and when I come back to the VM, it says, "error: unknown filesystem. error: you need to load the kernel first, failed to boot both default and fallback entries"

Last edited by PlumpyPumpkin69 (2023-06-28 01:07:42)

Offline

#2 2023-06-30 10:02:45

nl6720
The Evil Wiki Admin
Registered: 2016-07-02
Posts: 607

Re: Hyper-V won't boot OS after disabling ISO

PlumpyPumpkin69 wrote:
mount --mkdir /dev/sda1 /boot/EFI

Why are you mounting /dev/sda1 to /boot/EFI if it's already mounted to /boot?

Offline

#3 2023-07-01 21:24:06

PlumpyPumpkin69
Member
Registered: 2023-06-27
Posts: 2

Re: Hyper-V won't boot OS after disabling ISO

nl6720 wrote:
PlumpyPumpkin69 wrote:
mount --mkdir /dev/sda1 /boot/EFI

Why are you mounting /dev/sda1 to /boot/EFI if it's already mounted to /boot?

I don't know. I'm trying to learn linux with Arch( because I'm retarded, I guess), and I'm just following the installation guide. I figure dit out, anyway. Basically --efi-directory needed to = /boot/EFI, not "boot."

Are you saying I could have just had it = "/boot" since that is where I mounted sda1, to begin with?

Offline

#4 2023-07-02 06:16:51

nl6720
The Evil Wiki Admin
Registered: 2016-07-02
Posts: 607

Re: Hyper-V won't boot OS after disabling ISO

Yes, you should have used --efi-directory=/boot.

Offline

Board footer

Powered by FluxBB