You are not logged in.

#1 2013-05-14 03:42:14

drsjlazar
Member
From: Kasama
Registered: 2009-10-01
Posts: 133
Website

[Solved] Fresh install does not detect /sbin/init

I just got a new rig and for the past 4 days I've been trying to set up a dual boot with Windows 7 and Arch Linux. Today I've come so close and yet so far. refind seems to be working ok, Windows boots fine from it but Arch craps out. This is what happens. Also, there is no /etc/fstab. My partitions are all btrfs subvolumes.
http://imgur.com/a/dnJlz
Please help. I can't go through another install...

Last edited by drsjlazar (2013-05-15 21:22:02)

Offline

#2 2013-05-14 03:47:25

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,411

Re: [Solved] Fresh install does not detect /sbin/init

What you're seeing with the "ls" is the contents of the initramfs. cd to "new_root" and see what's there. I'm guessing you're mounting the wrong partition or you don't have the correct subvolume set as default.

Offline

#3 2013-05-14 03:54:27

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

Re: [Solved] Fresh install does not detect /sbin/init

Even if all your partitions are btrfs subvolumes, you still have to tell the kernel/initramfs which partition to mount as your rootfs.  This is typically done with a kernel command line parameter.  So if your root is in fact the root of the btrfs filesystem, it would be rootflags=subvolid=0.  Though this can also be done by setting a default /.  Something like "btrfs subvolume set-default 0 /" would make that same subvolume the rootfs. 

It should be that you can set defaults for every mountpoint, but I have not gotten this to work reliably, so I just put things in my fstab.  You will still likely need an fstab if you want your rootfs to actually be mounted rw and whatever other options you may want.  Though again, this can be done with the kernel command line.  You just need to add options to your rootflags= parameter. 

So for example, I have this on my kernel command line:

\EFI\arch\vmlinuz-linux.efi initrd=/EFI/arch/initramfs-linux.img root=/dev/disk/by-label/btrfs rootflags=subvol=rootfs etc. etc. 

But then because I have the minimum there, I also have this line in my fstab:

% cat /etc/fstab
...
/dev/disk/by-label/btrfs  /   btrfs   noatime,ssd,discard,compress=lzo   0   0
...

If you want to do without an fstab, you will need to combine these things:

\EFI\arch\vmlinuz-linux.efi initrd=/EFI/arch/initramfs-linux.img root=/dev/disk/by-label/btrfs rw rootfstype=btrfs rootflags=noatime,ssd,discard,compress=lzo,subvol=rootfs etc. etc. 

Of course this example assumes that your btrfs pool is called "btrfs" and that your rootfs is called "rootfs".  If you use a subvol that is not the root of the pool, you can use subvol=, but the root of the pool does not have a name, so you are forced to use subvolid=0.  The other subvolumes have ids as well, but you have the option.  I just find the label/name easier to remember than the id/number.

Offline

#4 2013-05-15 21:21:40

drsjlazar
Member
From: Kasama
Registered: 2009-10-01
Posts: 133
Website

Re: [Solved] Fresh install does not detect /sbin/init

Thank you both. This worked.

Offline

Board footer

Powered by FluxBB