You are not logged in.

#1 2015-08-19 22:07:20

Paul15071992
Member
From: Vienna
Registered: 2014-08-30
Posts: 31

failed to change root from USB

My Windows updated from version 8.0 to 8.1. and after the update I couldn't start Arch Linux anymore and was dropped into emergency shell.

I used a live USB and tried to reinstall grub.
This is what I did:

  • mkdir /mnt/arch

  • mount /dev/<root> /mnt/arch

  • mount /dev/<boot> /mnt/arch/boot

  • mount /dev/<home> /mnt/arch/home

  • arch-chroot /mnt/arch

The last command didn't work and I've got following error

mount point /mnt/arch/proc does not exist

After searching the web I found out that I should try to mount `proc` using following command

mount -t /proc proc /mnt/arch/proc/

This didn't worked either, because there was nor folder `/mnt/arch/proc`

I saw that none of the following folders is present in `/mnt/arch`:

  • @bin

  • dev

  • lib64@

  • proc

  • run

  • sys

  • tmp

  • var

  • etc

  • lib@

  • lost+found

  • opt

I searched the wiki and forum, but didn't found something helpful.
Could someone give me a hint please?

Last edited by Paul15071992 (2015-08-21 17:31:50)

Offline

#2 2015-08-20 01:27:09

steelcowboy
Member
From: California, USA
Registered: 2014-09-04
Posts: 48

Re: failed to change root from USB

Wow, that's a lot of folders that aren't in /mnt/arch. Which folders are present? And do they have anything in them? It sounds like your Arch partitions (at least your root partition) may have been corrupted. Assuming it's not too much trouble and everything on /home is saved, I'd probably recommend reformatting your root partition and just reinstalling everything -- since /etc and /var are not present, you've likely lost all of your system-wide configuration files and your package cache and therefore would not be able to rebuild your system in its state.

Also your title mentions GRUB but if you're getting to the emergency shell GRUB is doing its job -- booting the kernel and loading the initramfs.

Last edited by steelcowboy (2015-08-20 01:28:22)

Offline

#3 2015-08-20 03:44:09

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,604

Re: failed to change root from USB

Paul15071992 wrote:
  • mkdir /mnt/arch

  • mount /dev/<root> /mnt/arch

  • mount /dev/<boot> /mnt/arch/boot

  • mount /dev/<home> /mnt/arch/home

  • arch-chroot /mnt/arch

Somehow I doubt you actually used <root> as the device. Don't paraphrase.

Are you sure you mounted the right devices? Windows could easily have added a partition and screwed up the numbers.

Offline

#4 2015-08-20 08:10:32

Paul15071992
Member
From: Vienna
Registered: 2014-08-30
Posts: 31

Re: failed to change root from USB

Yes I'm 100% sure that I mounted the <root>, because after mounting it, following two folders appeared:

  • boot

  • home

this are the only folders which were present in /mnt/arch

After mounting <boot>, all my initframs are present in the folder /mnt/arch/boot

What more disturbing is, that after mounting <home>, the folder /mnt/arch/home also contains

  • boot

  • home

but they are empty

Last edited by Paul15071992 (2015-08-20 08:10:49)

Offline

#5 2015-08-20 12:24:22

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,604

Re: failed to change root from USB

I give up.

Offline

#6 2015-08-20 13:46:15

Paul15071992
Member
From: Vienna
Registered: 2014-08-30
Posts: 31

Re: failed to change root from USB

does this mean that I'll have to reinstall Arch?

Offline

#7 2015-08-20 14:22:19

Fixxer
Member
From: Poland
Registered: 2011-08-29
Posts: 217

Re: failed to change root from USB

No, no, no ...

Do it one more time - in EXAMPLE /dev/sda1 is boot partition and /dev/sda2 is root partition:

mount /dev/sda2 /mnt
mount /dev/sda1 /mnt/boot
mount -o bind /proc /mnt/proc
mount -o bind /sys /mnt/sys
mount -o bind /dev /mnt/dev
mount -o bind /dev/pts /mnt/dev/pts
chroot /mnt /bin/bash

If you have any troubles with Grub recovery / installation - post output of bootinfoscript:
http://sourceforge.net/projects/bootinfoscript/ .

Offline

#8 2015-08-20 14:32:01

Paul15071992
Member
From: Vienna
Registered: 2014-08-30
Posts: 31

Re: failed to change root from USB

The problem is that after mounting <root> the folders for proc, sys  and dev do not appear -> the mounting commands do not work throwing following errors:

mount point /mnt/arch/proc does not exist
mount point /mnt/arch/sys does not exist
mount point /mnt/arch/dev does not exist

Offline

#9 2015-08-20 14:37:19

Fixxer
Member
From: Poland
Registered: 2011-08-29
Posts: 217

Re: failed to change root from USB

From what system do you want "to chroot" into Arch? What livecd are you running then?

Directory "arch" in /mnt/arch isn't necessary - as same as mounting /home. On livecd directory tree it does not exist. Do as I wrote above OR create the directory first:

mkdir -p /mnt/arch

===========
Here is EXAMPLE (chroot from SystemRescueCD into Arch Linux on VirtualBox). I don't have /boot partition:

chroot.jpg

Last edited by Fixxer (2015-08-20 14:37:51)

Offline

#10 2015-08-20 19:36:56

Paul15071992
Member
From: Vienna
Registered: 2014-08-30
Posts: 31

Re: failed to change root from USB

So this time I managed to mount all partitions, but I can't change root.

@Fixxer: I mounted everything what can be seen in your photo

chroot /mnt/arch /bin/bash
chroot: failed to run command /bin/bash: No such file or directory 
chroot /mnt/arch 
chroot: failed to run command /usr/bin/zsh: No such file or directory 

In folder /mnt/arch I've got following folders :

  • bin

  • boot

  • dev

  • etc

  • home

  • proc

  • run

  • sys

  • tmp

Offline

#11 2015-08-21 17:31:08

Paul15071992
Member
From: Vienna
Registered: 2014-08-30
Posts: 31

Re: failed to change root from USB

http://s11.postimg.org/tta41s0tf/IMAG1554.jpg

http://s11.postimg.org/h35voosv7/IMAG1560.jpg

-- mod edit: converted img to url tags.  Trilby --

Last edited by Trilby (2015-08-22 13:48:12)

Offline

#12 2015-08-22 12:43:17

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

Re: failed to change root from USB

You appear to have two separate Windows systems on that disk -- why?

What are the two GNU/Linux partitions for?

Why are you using `chroot` rather than `arch-chroot` (from the Arch live ISO)?

To which partition are you attempting the chroot?

Please post the *exact* commands you have used and the *exact* output of those commands.

Rather than posting screenshots (which should be thumbnail links, BTW) use a pastebin client to generate a link and post that here instead.
https://wiki.archlinux.org/index.php/Li … in_clients

EDIT: Please also post the output of:

# efibootmgr -v

You can use any live ISO to generate this output.

Last edited by Head_on_a_Stick (2015-08-22 12:45:06)

Offline

#13 2015-08-22 13:49:59

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,563
Website

Re: failed to change root from USB

Scimmia wrote:

I give up.

Paul15071992 wrote:

does this mean that I'll have to reinstall Arch?

No, it means you should have heeded the advice provided which has now been reiterated by Head_on_a_Stick.

If you persist in 'paraphrasing' away the important information no one will be able to help you.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#14 2015-08-23 10:53:38

Paul15071992
Member
From: Vienna
Registered: 2014-08-30
Posts: 31

Re: failed to change root from USB

@Head_on_a_Stick:

All the Windows partitions where there when I bought the laptop and thought to keep Windows because it's with license and I'll never know when I'll be need it.

there are 3 partitions for Arch:

  • sda7 - boot partition

  • sda8 - home partition

  • sda10 - root partition

I tried to chroot on sda10, and I used chroot instead of arch-chroot because in one answer from above it was suggested to use chroot.

http://postimg.org/image/faxmy1ve1/

http://postimg.org/image/faxmy1ve1/

Offline

#15 2015-08-23 11:27:42

Awebb
Member
Registered: 2010-05-06
Posts: 6,309

Re: failed to change root from USB

You have to create a folder, before you can mount anything to it. Since arch-chroot is just a shell script, you can read it to see what it does, this might help.

Offline

#16 2015-08-23 13:06:14

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

Re: failed to change root from USB

A little spoon-feeding -- from the Arch live ISO:

# mount /dev/sda10 /mnt
# mount /dev/sda7 /mnt/boot
# mount /dev/sda8 /mnt/home
# arch-chroot /mnt /bin/bash

Post any error messages verbatim.

Offline

#17 2015-08-24 13:56:59

Paul15071992
Member
From: Vienna
Registered: 2014-08-30
Posts: 31

Re: failed to change root from USB

I already tried it. Following error message appears:

chroot: failed to run command /bin/bash: No such file or directory

Offline

#18 2015-08-24 16:30:28

loqs
Member
Registered: 2014-03-06
Posts: 17,448

Re: failed to change root from USB

With the same environment as Head_on_a_Stick suggested so

# mount /dev/sda10 /mnt
# mount /dev/sda7 /mnt/boot
# mount /dev/sda8 /mnt/home

The output of

#ls -la /mnt/bin
#ls -la /mnt/usr

Edit: note the absence of the trailing / is intended and important

Last edited by loqs (2015-08-24 16:49:41)

Offline

#19 2015-08-24 18:57:21

Paul15071992
Member
From: Vienna
Registered: 2014-08-30
Posts: 31

Re: failed to change root from USB

ls -la /mnt/bin
lrwxrwxrwx 1 root root 7 /mnt/bin -> usr/bin

ls -la /mnt/usr
total 8
drwxr-xr-x 2 root root 4096 .
drwxr-xr-x 2 root root 4096 ..

Offline

#20 2015-08-24 19:27:10

loqs
Member
Registered: 2014-03-06
Posts: 17,448

Re: failed to change root from USB

Paul15071992 wrote:
ls -la /mnt/bin
lrwxrwxrwx 1 root root 7 /mnt/bin -> usr/bin

ls -la /mnt/usr
total 8
drwxr-xr-x 2 root root 4096 .
drwxr-xr-x 2 root root 4096 ..

As there is nothing in /mnt/usr ( speciffically no /mnt/usr/bin and /mnt/usr/lib ) chroot / arch-chroot can not succeed as the expected binaries inside /mnt are missing.
If /dev/sda10 really is your root file system then it seems a lot of files / directories have been erased from it.
In your first post of this thread

Paul15071992 wrote:

I saw that none of the following folders is present in `/mnt/arch`:
    @bin
    dev
    lib64@
    proc
    run
    sys
    tmp
    var
    etc
    lib@
    lost+found
    opt

In post 10

Paul15071992 wrote:

In folder /mnt/arch I've got following folders :
    bin
    boot
    dev
    etc
    home
    proc
    run
    sys
    tmp

If that is the same file system and you did not recreate the directories without mentioning it then that file system / disk appears to be suffering from ongoing issues.
Given what is absent from the root file system a fresh install / restore from backups would certainly seem simpler to me than trying to fix the existing situation.

Offline

#21 2015-08-24 19:33:27

Paul15071992
Member
From: Vienna
Registered: 2014-08-30
Posts: 31

Re: failed to change root from USB

That's my fault sad
I recreated them and mounted them with "-o bind", because I saw so on a site.

The recreation of the files took place in a different attempt to chroot.

Is it bad?

Offline

#22 2015-08-24 19:45:17

loqs
Member
Registered: 2014-03-06
Posts: 17,448

Re: failed to change root from USB

If my understanding is correct and the only folders you had on the root file system before you recreated them were

/boot
/home

Then all of the arch install is missing and you need to either recover the entire install if that is even possible given the file system has been written to after the erasure has occurred.
Or restore / reinstall as I said above.

Offline

Board footer

Powered by FluxBB