You are not logged in.

#1 2014-01-19 04:52:21

seniorihor
Member
Registered: 2014-01-19
Posts: 5

[Solved] Error: Root device mounted successfully, but /sbin/init...

I have fresh instalation of arch on btrfs and it works perfect.
I want move my root into subvolume, but after that I get error about /sbin/init.
I tried to add init=/usr/lib/systemd/systemd to kernel line, but it doesn't work for me.
When I move my root back - it works again.

Please, help me to put my root into subvolume.

Last edited by seniorihor (2014-01-28 15:27:13)

Offline

#2 2014-01-19 05:01:09

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

Re: [Solved] Error: Root device mounted successfully, but /sbin/init...

You have to be waaaaayyy more specific about what you have actually done to run into this issue.  Otherwise, the only responses you will get are ones in whihc people are simply guessing as to what your actual problem may be.

How was your btrfs partition laid out originally and where are you trying to move it?  After you move it, are you adjusting things to the right thing mount?  How is your bootloader configured... and what bootloader are you using?  These are just a sampling of questions that I should have been able to answer from the original inquiry. 


BTW, welcome to the Arch forums.

Offline

#3 2014-01-19 21:42:46

seniorihor
Member
Registered: 2014-01-19
Posts: 5

Re: [Solved] Error: Root device mounted successfully, but /sbin/init...

ok, yesterday I installed arch on my work computer (unfortunately I have no access to it in this moment...)

Root of my arch is on /dev/sda1 (btrfs).
/boot is on /dev/sda6 (ext4).
System is working.

So what I changed after that:
1. Create new subvolume on btrfs root:
btrfs subvolume create @arch
2. Move whole the system into this subvolume:
mv *(of course except the @arch folder) @arch/
3. Fix fstab:
add "subvol=@arch" to the root line
4. Regenerate grub:
grub-mkconfig -o /boot/grub/grub.cfg (but it seems like it doesn't change anything)

After this I got error when grub loads system.
But when I make all changes back - it's working correctly.

PS: right now I look at my home arch installation and found one interesting thing in the grub config: "rootflags=subvol=@arch".
maybe, I made mistake because I didn't write "rootflags".
I'll try it tomorrow and inform result.

Offline

#4 2014-01-19 22:34:11

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

Re: [Solved] Error: Root device mounted successfully, but /sbin/init...

That is because the grub.cfg is being generated from that which you are currently booted.  So as far as it was concerned, you wanted to mount subvolid=0. 

Instead of using the mv command, you should learn to use the native btrfs tools.  It would have been much simpler and safer to simply do something like

# btrfs subvolume snapshot / /@arch

This would have not only made an exact copy of your current filesystem, but it would have also had the benefit of taking absolutely no space to have two copies.  In the event that you thought you had fudged something up, you would still have the original filesystem there waiting for you.

By the way, please use code tags (like I have done above) for things like code and output.  You can see how to do these things and much more by following the BBCode link below.

Offline

#5 2014-01-24 17:38:24

KenMacD
Member
Registered: 2014-01-06
Posts: 19

Re: [Solved] Error: Root device mounted successfully, but /sbin/init...

Not sure if this helps but if you:

btrfs subvolume set-default <ID>

then you no longer have to worry about telling it the subvolume during boot.

Offline

#6 2014-01-24 18:51:43

vanquish
Member
Registered: 2013-12-28
Posts: 49

Re: [Solved] Error: Root device mounted successfully, but /sbin/init...

to the grub-mkconfig issue: it's an anyoing bug in 10_archlinux script. since a few weeks this script was introduced. it just forget to create the @-paths in grub.cfg. just add them manually.
https://bugs.archlinux.org/task/38223
https://bugs.archlinux.org/task/38453
https://bugs.archlinux.org/task/38455

Offline

#7 2014-01-27 21:17:42

seniorihor
Member
Registered: 2014-01-19
Posts: 5

Re: [Solved] Error: Root device mounted successfully, but /sbin/init...

Thanks to everyone who responded!
I took the given above suggestions and made as follows:

btrfs subvolume snapshot / /@arch

change fstab:

LABEL=arch / btrfs rw,relatime,space_cache,subvol=@arch 0 0

and fix grub.cfg:

linux /vmlinuz-linux root=UUID=4755a6e7-c839-46f0-9df5-53b4f764ee6d rw,rootflags=subvol=@arch  quiet

whereupon after reboot grub said something like "rootflags=subvol=@arch not found" but system is loaded.
I was happy not long - I noticed that the system does not work with my new subvolume, but with root:

touch /i_am_test_file
mount /dev/sda1 /mnt/old
mount /dev/sda1 /mnt/new -o subvol=@arch
ls /mnt/old
=> @arch  bin  boot  dev  etc  home  i_am_test_file...
ls /mnt/new
=> ---there is no this file---

So, I do not know what to do now sad
Please tell me if there is the idea solution.

Offline

#8 2014-01-27 23:51:13

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

Re: [Solved] Error: Root device mounted successfully, but /sbin/init...

"rw,rootflags=subvol=@arch" makes no sense. You wanted "rw rootflags=subvol=@arch". 'rw' is entirely separate from the rootflags= parameter.

Offline

#9 2014-01-28 13:21:30

seniorihor
Member
Registered: 2014-01-19
Posts: 5

Re: [Solved] Error: Root device mounted successfully, but /sbin/init...

Thanks everyone!
Problem solved!

Offline

#10 2014-01-28 15:17:13

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

Re: [Solved] Error: Root device mounted successfully, but /sbin/init...

Please mark the thread as [Solved] then.  This can be done by editing the first post.

Offline

Board footer

Powered by FluxBB