You are not logged in.

#1 2011-06-26 16:52:19

Lockheed
Member
Registered: 2010-03-16
Posts: 1,550

Cannot boot after system restore

I had to recreate my partitions, so I rsynced them to my external, and then after recreating the partitions, copied the content back. However, this all changed my UUIDs and system does not boot even though I updated those in fstab and grub's menu.lst.

ERROR: Unable to determine major/minor number of root device '/dev/disk......'
You are being dropped to a recovery shell

If I change UUID format to old /dev/sda, another error pops up:

ERROR: Root device mounted successfully, but /sbin/init does not exist.
Bailing out, you are on your own. Good luck.

/bin/sh: can't access tty: job control turned off

I regenerated initramfs but it did not change anything.

my fstab

/dev/sda2 /boot ext4 defaults 0 1
/dev/sda3 / ext4 defaults 0 1
/dev/sda4 /mnt/Disk_D  ext4 defaults 0 2

#Other non-working value
#UUID=7c0aafb8-6925-4ced-9d15-49037096af18 /boot ext4 defaults 0 1
#UUID=31d71e99-8cb9-4ff6-a2ee-fb1f7495e2e2 / ext4 defaults 0 1
#UUID=08e49767-99a0-4ac4-8740-813b82352b58 /mnt/Disk_D  ext4 defaults 0 2

menu.lst

# general configuration:
timeout   2
default   0
color light-blue/black light-cyan/blue

# boot sections follow
# each is implicitly numbered from 0 in the order of appearance below
#
# TIP: If you want a 1024x768 framebuffer, add "vga=773" to your kernel line.
#
#-*

# (0) Arch Linux
title  Arch 38
root   (hd0,1)
kernel /vmlinuz26 root=/dev/sda2 ro quiet
initrd /kernel26.img

#root=/dev/disk/by-uuid/7c0aafb8-6925-4ced-9d15-49037096af18

# (0) Arch Linux
title  Ubuntu
root   (hd0,0)
kernel /boot/vmlinuz-2.6.31-23-generic-pae root=/dev/sda1 ro quiet
initrd /boot/initrd.img-2.6.31-23-generic-pae

I need to fix it ASAP  because this is my work laptop, so please help.

Last edited by Lockheed (2011-06-26 19:12:35)

Offline

#2 2011-06-26 17:07:28

foutrelis
Developer
From: Athens, Greece
Registered: 2008-07-28
Posts: 705
Website

Re: Cannot boot after system restore

Where exactly does it fail during the boot process, and what error messages do you get?

You can also try the fallback option.

Offline

#3 2011-06-26 17:26:04

Lockheed
Member
Registered: 2010-03-16
Posts: 1,550

Re: Cannot boot after system restore

No, fallback won't work for the same reason.

ERROR: Unable to determine major/minor number of root device '/dev/disk......'
You are being dropped to a recovery shell

or, if I change UUIDs to old /dev/sda format in fstab, I get this:

ERROR: Root device mounted successfully, but /sbin/init does not exist.
Bailing out, you are on your own. Good luck.

/bin/sh: can't access tty: job control turned off

which is bullsh!t, as /sbin/init is there

I have two partitions:
/ and /boot/

Last edited by Lockheed (2011-06-26 17:27:10)

Offline

#4 2011-06-26 17:30:35

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,020

Re: Cannot boot after system restore

Offline

#5 2011-06-26 17:32:09

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

Re: Cannot boot after system restore

https://wiki.archlinux.org/index.php/In … ting_Linux

One of the best wiki pages we have for recovery.

Offline

#6 2011-06-26 17:48:09

Lockheed
Member
Registered: 2010-03-16
Posts: 1,550

Re: Cannot boot after system restore

I am running into an error

root@juha-ubuntu:/media/arch# mount -t proc proc /media/arch/proc
root@juha-ubuntu:/media/arch# mount -t sysfs sys /media/arch/sys
root@juha-ubuntu:/media/arch# mount -o bind /dev /media/arch/dev
root@juha-ubuntu:~# mount /dev/sda2 /media/arch/boot
root@juha-ubuntu:~# chroot /media/arch /bin/bash 
chroot: cannot run command `/bin/bash': Exec format error

Offline

#7 2011-06-26 17:49:22

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: Cannot boot after system restore

Lockheed wrote:

No, fallback won't work for the same reason.

ERROR: Unable to determine major/minor number of root device '/dev/disk......'
You are being dropped to a recovery shell

or, if I change UUIDs to old /dev/sda format in fstab, I get this:

ERROR: Root device mounted successfully, but /sbin/init does not exist.
Bailing out, you are on your own. Good luck.

/bin/sh: can't access tty: job control turned off

which is bullsh!t, as /sbin/init is there

I have two partitions:
/ and /boot/

Which probably means you're mounting the boot partition, not the root partition...

Offline

#8 2011-06-26 17:50:32

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,020

Re: Cannot boot after system restore

The wiki article I linked says it might be due to non-matching architectures.

Offline

#9 2011-06-26 17:58:16

Lockheed
Member
Registered: 2010-03-16
Posts: 1,550

Re: Cannot boot after system restore

falconindy wrote:

Which probably means you're mounting the boot partition, not the root partition...

I don't think so. My fstab says

/dev/sda2 /boot ext4 defaults 0 1
/dev/sda3 / ext4 defaults 0 1
/dev/sda4 /mnt/Disk_D  ext4 defaults 0 2

Offline

#10 2011-06-26 18:48:35

Lockheed
Member
Registered: 2010-03-16
Posts: 1,550

Re: Cannot boot after system restore

I finally regenerated it but problem persists with exactly the same errors.

Last edited by Lockheed (2011-06-26 18:49:38)

Offline

#11 2011-06-26 19:50:30

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,020

Re: Cannot boot after system restore

Shouldn't it be root=sda3, not sda2, in menu.lst?

Offline

#12 2011-06-26 20:55:39

Lockheed
Member
Registered: 2010-03-16
Posts: 1,550

Re: Cannot boot after system restore

lucke wrote:

Shouldn't it be root=sda3, not sda2, in menu.lst?

Apparently, it should. I thought it supposed to be boot partition there.

Anyway, it is booting now but just when SLIM is about to autologin, I get

'Failed to login' in the middle of the screen and am dropped to console.

Offline

#13 2011-06-26 22:18:50

MoonSwan
Member
From: Great White North
Registered: 2008-01-23
Posts: 881

Re: Cannot boot after system restore

Try using StartX from cli and post whether that works on not?  That's what I'd do.

Offline

#14 2011-06-27 06:42:58

Lockheed
Member
Registered: 2010-03-16
Posts: 1,550

Re: Cannot boot after system restore

Ok, so the error in the middle of the screen (graphical message, not console) is

"Failed to execute login command"

SLIM then falls into login/relogin/relogin,,, loop so I can't do anything there, but when I switch to another console and type startx, I get

hostname: Host name lookup failure
xauth: timeout in locking authority file //.Xauthority
xauth: timeout in locking authority file //.Xauthority
xauth: timeout in locking authority file //.Xauthority
xauth: timeout in locking authority file //.Xauthority
etc.

Offline

#15 2011-06-27 10:12:42

Lockheed
Member
Registered: 2010-03-16
Posts: 1,550

Re: Cannot boot after system restore

Right, I managed to fix permissions on /.Xauthority and I get to desktop but then almost nothing works.

I am sure it has something to do with permissions on file system because I changed them before on both / and /boot partitions using

sudo chown -R $USER:$USER <Mount Point>

I subsequently tried fixing it form Ubuntu using the same method:

root:root for /
juha:users for /home/juha
root:root for /boot

and as mentioned, I am now able to login, but most of things still don't work (for example, sudo, terminal etc, etc).

Offline

#16 2011-06-27 17:18:14

lukaszan
Member
Registered: 2011-05-05
Posts: 117

Re: Cannot boot after system restore

If you did

chown -R root:root /

then you did mess up your permissions. You will have to reinstall all packages. Do it from runlevel 3 (I'm guessing you run SLIM in 5), or if you can't login, you'll have to do it from live CD.

Offline

#17 2011-06-27 17:37:37

Lockheed
Member
Registered: 2010-03-16
Posts: 1,550

Re: Cannot boot after system restore

Is there some command I can run to reinstall all installed packages? For pacman or yaourt? After all, they keep track of everything that's installed on the system.

Offline

#18 2011-06-27 18:06:30

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,020

Re: Cannot boot after system restore

Try

pacman -S $(comm -23 <(pacman -Qq) <(pacman -Qmq))

Offline

#19 2011-06-27 20:03:16

Lockheed
Member
Registered: 2010-03-16
Posts: 1,550

Re: Cannot boot after system restore

TI actually used this:

pacman -S $(pacman -Qq | grep -v "$(pacman -Qmq)")

and am now writing from fully functioning system ;D

Last edited by Lockheed (2011-06-27 20:04:00)

Offline

Board footer

Powered by FluxBB