You are not logged in.

#1 2020-11-01 15:07:59

Cyberpunk_Is_Bae
Member
Registered: 2020-03-23
Posts: 36

Install Hangs on "Booting from Hard Disk..."

I'm in a VM.

I'm going for the simplest possible install with encryption.  I'm used to using install scripts and just want to get something that will boot and support encryption right now.  I understand setting timezone and so on is important but it is not my current goal.  I want to understand what the install scripts are doing so I'm doing things manually at this time.

I did this:

# nano /etc/pacman.d/mirrorlist // and pick favorite servers
    
# cfdisk // and set up a basic linux drive

# cryptsetup luksFormat MY_HD // Do the things it asks, set a good password etc
# cryptsetup luksOpen MY_HD data

# mkfs.ext4 /dev/mapper/data
# mount /dev/mapper/data /mnt

# pacstrap /mnt base linux linux-firmware

# genfstab -U /mnt >> /mnt/etc/fstab

# arch-chroot /mnt

# exit
# reboot

I assume LUKS is breaking the install somehow, but I am new to doing this manually, so please don't murder me.

Is this the wrong procedure for doing an encrypted setup?  If so, what is the right one?

Thanks.

Last edited by Cyberpunk_Is_Bae (2020-11-01 15:10:04)

Offline

#2 2020-11-01 15:11:38

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,410

Re: Install Hangs on "Booting from Hard Disk..."

If that is literally all of what you've done so far you are missing quite a bit but most importantly a boot loader.

Go over https://wiki.archlinux.org/index.php/In … the_system again.

... Also configuring timezone and the time setup correctly is generally not an optional operation as many real life usecases rely on it being correct even if just for "testing" purposes

Last edited by V1del (2020-11-01 15:16:22)

Online

#3 2020-11-02 01:38:02

Cyberpunk_Is_Bae
Member
Registered: 2020-03-23
Posts: 36

Re: Install Hangs on "Booting from Hard Disk..."

Alright from what I have above, I'm now creating a 200M boot partition before the main hard drive, and I now run mkinitcpio -P between arch-chroot and passwd, to address the additional step of cryptsetup from what the guide provides.

After that I pacman -S grub.  Then I run grub-install /dev/sda, and it finishes without error.

I get this at boot:

GRUB loading.
Welcome to GRUB!

error: no such device: <id>.
error: unknown filesystem.
Entering rescue mode...
grub rescue >

I assume since I have seen this output frequently in the past on other installations of other distros that Grub is not hooked up to the hard drive correctly, and I'm sure that's my fault, but I'm not sure where the disconnect is or why it isn't immediately asking me for my password.  Anybody know?

Offline

#4 2020-11-02 08:33:09

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,410

Re: Install Hangs on "Booting from Hard Disk..."

Have you seen https://wiki.archlinux.org/index.php/GR … pted_/boot ? If so mention that when asking for feedback again, if not try to read the wiki more closely on what you have to do

Last edited by V1del (2020-11-02 08:34:52)

Online

#5 2020-11-02 17:19:55

Cyberpunk_Is_Bae
Member
Registered: 2020-03-23
Posts: 36

Re: Install Hangs on "Booting from Hard Disk..."

Thanks for the link.  I had not seen it.  I noticed this is a candidate for integration with the installer and I would second that it at least be loudly included for those of us who want to encrypt but don't want to understand every detail at the outset, fwiw.

I see the error that you probably were thinking that I had made, and made these changes:

# pacman -S grub nano
# nano /etc/default/grub // uncomment GRUB_ENABLE_CRYPTODISK=y
# grub-install /dev/sda

I'm running grub-install on /dev/sda without arguments in order to find the simplest possible base case (as I stated above, which remains my goal), because this is what I would do if I were building a bootloader installer and were given a flag by the user to enable a feature, but it's possible that it still needs explicit arguments.  Do you know if this is my problem or if I'm just not yet ingesting enough of the installation guide?

Last edited by Cyberpunk_Is_Bae (2020-11-02 17:22:45)

Offline

#6 2020-11-02 17:42:53

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,410

Re: Install Hangs on "Booting from Hard Disk..."

You need to grub-mkconfig to generate a new configuration based on config adjustments: https://wiki.archlinux.org/index.php/GRUB#Configuration

Online

#7 2020-11-02 21:11:35

Cyberpunk_Is_Bae
Member
Registered: 2020-03-23
Posts: 36

Re: Install Hangs on "Booting from Hard Disk..."

So I did a lot of reading and added as suggested after grub-install:

# grub-mkconfig -o /boot/grub/grub.cfg

I'm still getting the same issue.  I did change the cfdisk layout to a single bootable drive to simplify things.  Is that the problem?  Do you need a 200M boot partition or can I keep it more streamlined by just setting all 20 gigs of the VM as "Boot partition" type FS?

I also wonder if VirtualBox wants UEFI but I'd prefer not to open that can of worms if it is avoidable.  You're gonna have to forgive me here if I'm missing something obvious, this is a huge wall of text to parse, and I recognize the value of educating yourself about your own system but it remains a huge wall of text, so bear with me please.

I would have expected at this point that with the combination of setting the flag in the config file and running this config generator it would give me something on boot but it's still being stubborn.  I don't know where to go from here.

Offline

#8 2020-11-02 21:24:38

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: Install Hangs on "Booting from Hard Disk..."

Have you done the extra grub configuration needed for an encrypted system?
https://wiki.archlinux.org/index.php/Dm … oot_loader


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#9 2020-11-02 21:56:41

Cyberpunk_Is_Bae
Member
Registered: 2020-03-23
Posts: 36

Re: Install Hangs on "Booting from Hard Disk..."

Slithery wrote:

Have you done the extra grub configuration needed for an encrypted system?
https://wiki.archlinux.org/index.php/Dm … oot_loader

Thank you for the link.

From what I'm reading here, you need to append to the end of /etc/default/grub:

cryptdevice=UUID=device-UUID:cryptroot root=/dev/mapper/cryptroot

And it seems like you would need to do that during the step where we uncomment GRUB_ENABLE_CRYPTODISK=y in that same file and at that same time (/etc/default/grub).

I'm at a loss how I find the device-UUID mentioned in the documentation or even what it is referring to.  Is it the partition ID?  The virtual drive in VirtualBox?  Is it a hardware ID and if so how does a piece of virtual hardware in a virtual machine controller have an ID at all?  Is it even related to the hard disk or am I wildly off?

Offline

#10 2020-11-02 22:21:49

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: Install Hangs on "Booting from Hard Disk..."

Cyberpunk_Is_Bae wrote:

From what I'm reading here, you need to append to the end of /etc/default/grub:

cryptdevice=UUID=device-UUID:cryptroot root=/dev/mapper/cryptroot

No, you need to add it to the kernel parameters...
https://wiki.archlinux.org/index.php/Ke … eters#GRUB

I'm at a loss how I find the device-UUID mentioned in the documentation or even what it is referring to.  Is it the partition ID?  The virtual drive in VirtualBox?  Is it a hardware ID and if so how does a piece of virtual hardware in a virtual machine controller have an ID at all?  Is it even related to the hard disk or am I wildly off?

It's the UUID of the encrypted partition, you can do a lsblk -f on the drive to get this.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

Board footer

Powered by FluxBB