You are not logged in.

#1 2016-09-25 12:06:28

mrcold
Member
Registered: 2008-01-24
Posts: 150

Grub goes straight to commandline

I've recently tried to install arch alongside an existing ubuntu install and I have had lots of troubles regarding the boot partition and grub.   At this point when i boot my computer grub goes to a commandline and I can manually enter my arch install by specifying the root, vmlinuz and initrmfs the typing boot... but I have been unsuccessful in getting the ubuntu partition to boot.

I am using a laptop and I am not using UEFI mode.  I've installed grub to /dev/sda as suggested in the wiki, and have spent the last few hours trying random things from the internet, so at this point I'm not quite positive what the state of everything is. 

I AM able to chroot into the system, so I can provide any details you need... just tell me.

Offline

#2 2016-09-25 16:10:14

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: Grub goes straight to commandline

mrcold wrote:

I've installed grub to /dev/sda as suggested in the wiki

Please post the exact command(s) used.

Did you remember to https://wiki.archlinux.org/index.php/GR … ation_file?

If so, please post the content of said configuration file and the output of `blkid` & `parted -l`

Offline

#3 2016-10-07 09:26:49

Elizine
Member
From: United Kingdom
Registered: 2015-10-07
Posts: 39
Website

Re: Grub goes straight to commandline

Do a complete fresh install of grub2:
1) First I copied /boot/grub/ to /boot/grub-bak/, then deleted /boot/grub

# mkdir /boot/grub-bak
# cp -r /boot/grub/* /boot/grub-bak/*
# rm -r /boot/grub

2) Next I basically followed the Arch Wiki on GRUB2 again, issuing the following commands:
- Backed up then cleared the master boot record of the device I wish to install grub to (/dev/sdb)
Note: replace *user* with your username

# dd if=/dev/sdb of=/home/*user*/Documents/backupmbr.img bs=446 count=1
# dd if=/dev/zero of=/dev/sdb bs=446 count=1

- Loaded dm-mod module then installed grub (as wiki instructs) with the following:

# modprobe dm-mod
# grub_bios-install --boot-directory=/boot --no-floppy --recheck /dev/sdb

- Copy over some files:

# cp /usr/share/grub/{unicode.pf2,ascii.pf2} /boot/grub

- Make a new grub.cfg file:

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

Finally, reboot.

Offline

#4 2016-10-08 19:14:09

Zorbik
Member
Registered: 2016-08-09
Posts: 42

Re: Grub goes straight to commandline

I am currently having the same issue. I am running arch with an encrypted boot partition as well as lvm on luks full disk encryption for root, home, and swap.
When I boot, I type in my password to unencrypt my boot partition however this drops me straight into a command line instead of allowing me to boot into Arch.
Grub was originally working for me but I had to enter my password again to unencrypt the lvm partition so I followed the dm-crypt wiki page and created a keyfile to automatically unlock the lvm partition.
This did work once, however now I am having the issue described above. Can't seem to remember doing anything else that would have caused this.

I am on a UEFI system and followed dm-crypt's guide to the letter.
As far as the keyfile goes I used this guide.

EDIT: This says:

If GRUB loads but drops you into the rescue shell with no errors, it may be because of a missing or misplaced grub.cfg. This will happen if GRUB UEFI was installed with --boot-directory and grub.cfg is missing OR if the partition number of the boot partition changed (which is hard-coded into the grubx64.efi file).

This made me wonder if the grsec image was properly created. Reinstalled linux-grsec which didn't solve the issue, ended up recreating the grub.cfg and reinstalling grub using

# grub-mkconfig -o /boot/grub/grub.cfg
# grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub --recheck

This solved my problem. Hope some of this helps you.

Last edited by Zorbik (2016-10-08 20:33:52)

Offline

#5 2016-10-14 13:30:18

grisea
Member
Registered: 2016-05-29
Posts: 2

Re: Grub goes straight to commandline

The boot loader is not considering your Ubuntu partition, because you hadn't mount it when you generated the fstab file and installed grub: the partition wasn't abstracted for its invocation. You should have skipped the boot loader step within the Arch installation process, and, from Ubuntu, upgraded grub. The solutions are above this reply.

Offline

Board footer

Powered by FluxBB