You are not logged in.

#1 2013-02-13 03:55:05

youngunix
Member
Registered: 2013-01-16
Posts: 41
Website

[SOLVED] problems trying to fix wrong UUID!

hello all,

im trying to fix a boot error (no such device: uuid...) using a solution from this thread https://bbs.archlinux.org/viewtopic.php?id=157195. i've booted to livecd but cant get past

swapon dev/sda
swapon: stat failed dev/sda: no such file or directory

Last edited by youngunix (2013-02-16 03:31:06)


"UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity." --Dennis Ritchie-- RIP

Offline

#2 2013-02-13 04:10:36

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 14,219
Website

Re: [SOLVED] problems trying to fix wrong UUID!

Don't use the solution from that thread - it seems odd to say the least.  There is no reason to need swap during that process, and it's a good thing it failed as enabling a disk as swap rather than a partition will either fail, or could just destroy any data on that disk.

Just boot from the live cd, mount your boot partition, and fix your boot loader configs.


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

#3 2013-02-13 04:23:13

youngunix
Member
Registered: 2013-01-16
Posts: 41
Website

Re: [SOLVED] problems trying to fix wrong UUID!

so after mounting /boot the rest of the solution is ok?

new issue

mount point /mnt/boot does not exist 

can someone please inform me of where does grub load devices from? it keeps on saying

no such device: xxxxxx...   

grub.cfg doesnt have the UUID that shows up in the error.

thx

solutions that didnt work: rescue grub on the wiki, livecd steps, reintalling grub....

Last edited by youngunix (2013-02-13 05:46:52)


"UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity." --Dennis Ritchie-- RIP

Offline

#4 2013-02-13 11:15:06

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 14,219
Website

Re: [SOLVED] problems trying to fix wrong UUID!

The mount error is clear: /mnt/boot does not exist; you can only mount partitions to existing directories.  You could mount your root partition first to /mnt, then you'd have a /mnt/boot where you could mount your boot partition, but if you just want to mount your boot partition, that can be mounted to /mnt itself, or you'll need to mkdir /mnt/boot.

If you could not mount your boot partition, how could you do anything with the grub.cfg?  How do you know it doesn't have the UUID in the error?


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

#5 2013-02-13 18:07:55

youngunix
Member
Registered: 2013-01-16
Posts: 41
Website

Re: [SOLVED] problems trying to fix wrong UUID!

i mounted it without the /boot part, there was a separate boot partition which I copied /grub from it to /boot and deleted that partition (1GB). Then removed grub and reinstalled it

grub-install /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg

it rebooted to the GNU GRUB VERSION 2.0 like it should, but now I'm getting the emergency mode prompt.


"UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity." --Dennis Ritchie-- RIP

Offline

#6 2013-02-13 21:47:24

mariusmeyer
Member
From: Norway
Registered: 2009-04-25
Posts: 244

Re: [SOLVED] problems trying to fix wrong UUID!

If you deleted /boot, where do you think the kernel image went? If all you did was delete the contents of the partition and reinstall grub, then grub can't find the kernel image to load and thus you get to the emergency promt.

Offline

#7 2013-02-13 23:02:39

Kebertx
Member
Registered: 2012-01-02
Posts: 69

Re: [SOLVED] problems trying to fix wrong UUID!

youngunix wrote:

i mounted it without the /boot part, there was a separate boot partition which I copied /grub from it to /boot and deleted that partition (1GB). Then removed grub and reinstalled it

grub-install /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg

it rebooted to the GNU GRUB VERSION 2.0 like it should, but now I'm getting the emergency mode prompt.

If I understand you correctly, you deleted your /boot partition. That was probably a bad move. Now you may have grub's configuration in /boot, but you don't have a kernel image. Without the linux kernel also present in /boot, grub has nothing to do, hence the emergency prompt.

Reinstall the linux package, then re-install grub. Frankly, since you're going to the trouble anyways, you should just recreate your separate partition for your boot loader.

So, from the livecd:

mount /dev/sda1 /mnt                 # (Check with fdisk -l)
rm -rf /mnt/boot/*                   # (You want /boot to be a mount point for a partition, so it should not contain any files)
mount /dev/sda2 /mnt/boot            # (this should be the boot partition)
pacstrap /mnt base                   # (This wil reinstall the kernel, as well as make sure the rest of the system is working and up to date)
arch-chroot /mnt pacman -S grub-bios # (Reinstall GRUB)

Then the rest is exactly as you already said:

grub-install /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg

Better safe than sorry, just re-do the install process to make sure you have a working boot partition, and that the bootloader has a kernel to load. I'm assuming the rest of your system is already nice and configured properly, so after this goes off without a hitch, you can just reboot.

EDIT: Don't assume that the numbers on your disk match the ones in the example. Use fdisk, make sure you mount the right partitions to the right places.

Last edited by Kebertx (2013-02-13 23:05:42)

Offline

#8 2013-02-14 03:04:30

youngunix
Member
Registered: 2013-01-16
Posts: 41
Website

Re: [SOLVED] problems trying to fix wrong UUID!

mariusmeyer wrote:

If you deleted /boot, where do you think the kernel image went? If all you did was delete the contents of the partition and reinstall grub, then grub can't find the kernel image to load and thus you get to the emergency promt.

here is what /boot on /dev/sda3 has (original /boot was on /dev/sda1 partition):

drwxr-xr-x 6 root root     4096 Feb 13 01:33 grub
-rw-r--r-- 1 root root 13409822 Feb 13 01:33 initramfs-linux-fallback.img
-rw-r--r-- 1 root root  2892188 Feb 13 01:33 initramfs-linux.img
-rw-r--r-- 1 root root  3466832 Feb 11 12:52 vmlinuz-linux

@Kebertx

something not sure i understand correctly:
the first mount {/dev/sdaX is root, home, ..} correct?
now when I mount {/dev/sdaY} to /mnt/boot << do you mean /boot on /dev/sdaX or recreate the boot partition i deleted?


"UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity." --Dennis Ritchie-- RIP

Offline

Board footer

Powered by FluxBB