You are not logged in.

#1 2013-11-26 17:48:07

YGator
Member
Registered: 2013-08-09
Posts: 10

Stuck at Grub Prompt

I just updated a system using Pacman -Syu and when it rebooted it is at the grub> prompt.
Did I just lose my system or is there some way I can recover?

Thanks

Offline

#2 2013-11-26 17:53:52

teateawhy
Member
From: GER
Registered: 2012-03-05
Posts: 1,138
Website

Re: Stuck at Grub Prompt

Please include more information about what was upgraded and any changes you made since last boot. You can read /var/log/pacman.log from a live cd like archiso.

Offline

#3 2013-11-26 18:11:08

YGator
Member
Registered: 2013-08-09
Posts: 10

Re: Stuck at Grub Prompt

Thanks for the reply.

It was a system that has been running for many months.
There were no other changes made to the system except for pacman -Syu
This update had a lot of packages and grub was one of them.
I'll work on booting a live cd.

Thanks

Offline

#4 2013-11-26 18:27:47

YGator
Member
Registered: 2013-08-09
Posts: 10

Re: Stuck at Grub Prompt

If this helps any grub is GNU Grub version 0.97

Offline

#5 2013-11-26 18:35:21

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 17,929

Re: Stuck at Grub Prompt

Have you read this yet?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#6 2013-11-26 19:08:39

YGator
Member
Registered: 2013-08-09
Posts: 10

Re: Stuck at Grub Prompt

Yes, I am trying to figure out the commands I need to manually type to boot into archlinux.  That is assuming the updates did not mess up anything else.
I believe I need to do this:
set root=(hd0,5)
linux /boot/vmlinuz-linux root=/dev/sda5
initrd /boot/initramfs-linux.img
boot

However, I am attempting to get access to another system to find out what drive (which I think is probably 1 not 5) and the names of the Linux and initrd (which should be those above).

If I can get it booted then I can work on getting it to boot automatically next time.

Thanks

Offline

#7 2013-11-26 20:43:49

YGator
Member
Registered: 2013-08-09
Posts: 10

Re: Stuck at Grub Prompt

Well doing the root command (not set root) I have determined 1 = swap, 2 = ext2, 3 = ext2, 4 = does not exist
with root on 2 was able to cat /etc/fstab and saw 4 UUID mounts for /home, /boot, /, and swap (forget the order they were listed).

With being able to cat /etc/fstab from 2 I am assuming this is /.

So tried:

root (hd0,2)
kernel /boot/vmlinuz-linux root=/dev/sda2

but get file not found.  So possibly /boot is missing.  I am attempting to have the computer boot from a live Linux CD so I can mount the hard drive and see what the file system looks like.

Offline

#8 2013-11-26 21:11:01

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 17,929

Re: Stuck at Grub Prompt

Grub is 0 indexed, /dev/sdan is 1 indexed

IOW,    (hd0,2)  --> /dev/sda3


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#9 2013-11-26 21:28:01

loafer
Member
From: the pub
Registered: 2009-04-14
Posts: 1,772

Re: Stuck at Grub Prompt

Are you using testing?


All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.

Offline

#10 2013-11-26 22:18:05

YGator
Member
Registered: 2013-08-09
Posts: 10

Re: Stuck at Grub Prompt

It is a remote computer that I am working with someone on.  They went home for the day so will have to wait till tomorrow.

So the root command is zero based so then really I have 0 = ?, 1 = swap, 2 = ext2, 3 = ext2 and sda devices are 1 - 4.
I found /etc/fstab on 2 (sda3).
swap is 1 (sda2)
I did not find vmlinuz-linux on 3 (sda4).

So with that information:
/boot is 0 (sda1)
swap is 1 (sda2)
/ is 2 (sda3)
/home is 3 (sda4)

My commands to boot should then be (since there is a separate boot partition):
root (hd0, 0)
kernel /vmlinuz-linux root=/dev/sda3
initrd /initramfs-linux.img
boot


Thanks.  Will be trying this tomorrow.

No not using testing.

Thanks

Offline

#11 2013-11-27 19:13:11

YGator
Member
Registered: 2013-08-09
Posts: 10

Re: Stuck at Grub Prompt

So tried:
root (hd0, 0)
kernel /vmlinuz-linux root=/dev/sda3
initrd /initramfs-linux.img
boot

Got the below output.
Tried again with
kernel /vmlinuz-linux root=/dev/sda3,rootfstype=ext2
and
kernel /vmlinuz-linux root=/dev/sda3 rootfstype=ext2
and got the same thing.

/etc/fstab has the following in it

UUID=??? /home ext2 defaults 0 1
UUID=??? /boot ext2 defaults 0 1
UUID=??? swap swap defaults 0 0
UUID=??? / ext2 defaults 0 1

The ?? are the different UUIDs for each partition.

Any additional help to get this to boot appreciated.


Thanks


--------------------------------------------------------------
...
:: running early hook [udev]
:: running hook [udev]
:: Triggering uevents...
Waiting 10 seconds for device /dev/sda3 ...
ERROR: device '/dev/sda3' not found. Skipping fsck.
ERROR: Unable to find root device '/dev/sda3'.
You are being dropped to a recovery shell
      Type 'exit' to try and continue booting
sh: can't access tty; job control turned off
[rootfs /]# exit
Trying to continue (this will most likely fail) ...
mount: you must specify the filesystem type
You are being dropped to a recovery shell
      Type 'exit' to try and continue booting
sh: can't access tty; job control turned off
[rootfs /]#

Offline

#12 2013-11-27 19:18:24

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Stuck at Grub Prompt

Please use  code tags for such things.  If you are unsure of how to do this, you can follow the BBCode link below.

Offline

#13 2013-11-28 01:21:50

LimaSierra
Member
Registered: 2011-04-26
Posts: 41

Re: Stuck at Grub Prompt

Hi,

Can't you just use the installation media for this job?

I advise you to let other users confirm this, but IMHO this should work:

## Boot Arch install media
## Start as if you would do a fresh install
mount /dev/sda3 /mnt
arch-chroot /mnt
grub-install /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg
exit
umount /mnt
reboot

...assuming you don't have an UEFI-based install

HTH
Regards,
Laurent

Offline

#14 2013-11-28 01:39:00

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Stuck at Grub Prompt

...and for UEFI you would just have to make sure that efivarfs is mounted (if you want to make a firmware entry) and change the grub-install command a bit. 

UEFI is not really as hard as some on these boards like to complain that it is.

Offline

#15 2013-11-30 19:39:13

srs5694
Member
From: Woonsocket, RI
Registered: 2012-11-06
Posts: 719
Website

Re: Stuck at Grub Prompt

WonderWoofy wrote:

UEFI is not really as hard as some on these boards like to complain that it is.

Much of the problem is simply lack of familiarity. People who've been using PCs for years or decades have learned its quirks so well that they're second nature. ("Well, of course you've got to write a new boot loader to the first 440 bytes of the MBR, while avoiding the final 66 bytes at all cost! Isn't that obvious?!?") To somebody who knows the BIOS boot rules that well, EFI's entirely different rules come as a rude shock, even though they're no weirder. ("Well, of course you've got to register a new boot loader with the firmware by using "efibootmgr!" Isn't that obvious?!?") EFI bugs cause their own system-specific complications, but my impression is that they're being (slowly) fixed by manufacturers, so with any luck they'll be less of an issue before too long.

Offline

#16 2013-11-30 20:13:35

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Stuck at Grub Prompt

Yes, I think you're absolutely right srs5694.  For me, it was kind of a "rude shock" as well.  But by simply reading documentation I could find on it, and playing with it just a little, it wasn't so very hard to grasp.  In fact, the.ridikulus.rat has done an amazing job with the UEFI wiki page, which really lays things out quite nicely.  It is long, but if you read through that it should give you a pretty good understanding of UEFI.  In particular, there is a section that points out the differences between the two ways.  So I think what I am referring to is the people who like to skim over those important sections and then come here complaining that it doesn't make any damn sense!

Offline

#17 2013-11-30 23:37:49

srs5694
Member
From: Woonsocket, RI
Registered: 2012-11-06
Posts: 719
Website

Re: Stuck at Grub Prompt

YGator wrote:

Got the below output.

:: running early hook [udev]
:: running hook [udev]
:: Triggering uevents...
Waiting 10 seconds for device /dev/sda3 ...
ERROR: device '/dev/sda3' not found. Skipping fsck.
ERROR: Unable to find root device '/dev/sda3'.
You are being dropped to a recovery shell
      Type 'exit' to try and continue booting
sh: can't access tty; job control turned off
[rootfs /]# exit
Trying to continue (this will most likely fail) ...
mount: you must specify the filesystem type
You are being dropped to a recovery shell
      Type 'exit' to try and continue booting
sh: can't access tty; job control turned off
[rootfs /]#

At that final prompt, please type "ls /dev/sda*". It should show all your partitions, something like:

# ls /dev/sda*
/dev/sda  /dev/sda1  /dev/sda2  /dev/sda3  /dev/sda4  /dev/sda5

If it shows just /dev/sda, then that means that either there's something wrong with your partition table or the kernel you're running is lacking support for the partition table type you're using. If you see nothing at all, then that means that there's something wrong with hardware detection -- perhaps your kernel lacks support for your disk controller, or there's a physical problem with the cabling. Note that I'm assuming you have just one disk device, too -- you should unplug your USB flash drive(s) before booting in this way. (If you need a USB flash drive or second disk to boot, check with /dev/sdb and perhaps higher values to be sure that all of your disks are being detected.)

You can also try searching for information on the disk with the "dmesg" command, as in "dmesg | less" (assuming "less" is available in the emergency environment you've reached). You may find error messages associated with your SATA devices in there. The string "sda" might or might not appear; you can try searching for it, but if it turns up no hits, you should scan the "dmesg" output manually.

Offline

#18 2013-12-05 02:19:11

YGator
Member
Registered: 2013-08-09
Posts: 10

Re: Stuck at Grub Prompt

Thanks for the suggestions, but nothing worked.

Ended up just reloading archlinux on a different drive and then copying the needed files from the old drive.
Went with syslinux instead of grub and also a single partition with everything on it.

Offline

Board footer

Powered by FluxBB