LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-29-2014, 03:44 PM   #16
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225

Thank you for the info, Bourdieu. I'll give this a try tonight to see if I can help the OP.

Unless you beat me to it.
 
Old 09-08-2015, 10:07 AM   #17
brobr
Member
 
Registered: Oct 2003
Location: uk
Distribution: Slackware
Posts: 974

Rep: Reputation: 238Reputation: 238Reputation: 238
Did this ever got solved? It seems relevant to my problem:

The firmware of my internal m4 mSATA SSD drive that has the slackware install on it needs upgrading and now I have to find a way to keep working when this drive is taken out. For that reason, I am trying to boot a uefi-system from an external hard drive (a 1 TB HGST Touro mobile pro drive).

I am using -current with refind installed, which I copied to a partitition on the external drive (labeled 'slack').

Booting works from an external usb-stick (from the usb-pxe-install folder) and the external usb hard drive and its efi-partition are also recognized (on the usb3 port, not the usb2) by refind. The computer boots ok but hangs in the same way as described above:
Quote:
can't find /mnt in /etc/fstab
no /sbin/init found on rootdev (not mounted)..
I checked other -very helpful- posts on using external hard drives:

booting-usb-hard-drive-on-uefi-machine-in-legacy-mode-4175525891/
trouble-booting-current-from-an-usb-hard-disk-kernel-3-10-14-a-4175479742/

I used this script for making the initrd.gz (which is copied to the EFI partition of the external usb hard drive)
Code:
#!/bin/bash

KVERSION=4.1.6

KMODULES="usb-storage:xhci-hcd:ehci-hcd:ehci-pci:uhci-hcd:ehci-platform:ext4"

ROOTDEV="LABEL=slack"
ROOTFS="ext4"

mkinitrd -c -k ${KVERSION} -m $KMODULES -l uk -u -w 5 -r $ROOTDEV -f $ROOTFS -o /boot/initrd-${KVERSION}-touro.gz
The initrd.gz is loaded as cat /proc/modules shows that the mentioned modules are present.

lsblk (included by adding it to /bin in the initrd-tree and then rerunning mkinitrd by itself) shows all internal drives to be present but the external drive is not recognized.

/proc in / of the external drive is empty
/etc/fstab and /etc/mtab on the external drive
have the labels in there.
Code:
# <device-spec>  <mount-point>    <fs-type>    <options>     <dump> <pass>
/dev/sda6        swap             swap        defaults         0   0
LABEL=slack        /                ext4        defaults         1   1
LABEL=ESP        /boot/efi        vfat        defaults,noauto,umask=111,dmask=000   1   0
/dev/sda1        /home            ext4        defaults         1   2
...
I've got the feeling that something, needed to point to the external drive, is missing but what and where???

Does anyone have a clue?? Thanks in advance....

Last edited by brobr; 09-08-2015 at 10:09 AM.
 
Old 09-08-2015, 05:16 PM   #18
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
BtrFS can't be detected by Grub-2.00 or later without a patch to force the older Grub-1.xx detection mode and algorithms. This is especially true if you use a GPT partition table.

Even if you use an ext2/3/4 /boot partition, the Grub configuration tool can not read the /dev node of the devtmpfs and will usually pop up an error, or it will detect the UUID but will fail to setup the device read commands properly.

I have a patch for Grub-2.02~beta2 in my Slackworks to restore Grub-1.xx legacy detection to allow a BtrFS filesystem to be readable by Grub-2.xx. Word of warning, it will not work with Grub-2.00 which is shipped with Slackware, it will require 2.02~beta2.
 
1 members found this post helpful.
Old 09-09-2015, 10:39 AM   #19
brobr
Member
 
Registered: Oct 2003
Location: uk
Distribution: Slackware
Posts: 974

Rep: Reputation: 238Reputation: 238Reputation: 238
Well, the problem I experience has nothing to do with btrfs or grub. They are not used. Booting is done with refind or elilo: both work from the internal drive; refind can boot an external usb flash-drive but with an external hard drive, this leads to: rootdev-not-found-by-sbin-init-from-initramfs. At that point the initrd has kicked in, as far as I understand, at this point the root is remounted rw but the drive with / is not found. How come? It was used during boot...

Last edited by brobr; 09-09-2015 at 10:42 AM.
 
Old 09-09-2015, 10:49 AM   #20
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Did you assign the drive mapping via label or UUID?
 
Old 09-09-2015, 11:03 AM   #21
brobr
Member
 
Registered: Oct 2003
Location: uk
Distribution: Slackware
Posts: 974

Rep: Reputation: 238Reputation: 238Reputation: 238
Yes, I used LABEL= to assign the drive. In the mkinitrd that is. Refind uses UUID. But when I check the presence of drives with lsblk at the prompt when boot stalls, the external drive does not show at all (no /dev/sdc or /dev/sdd)... I added udev to the mkinitrd; does it need more, some rules or so?
 
Old 09-10-2015, 03:17 AM   #22
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Try setting it to UUID rather than label. Label only looks up the /dev node of the device if it exists in the system on the preset mountpoints. Because a USB drive is counted as a removable device, it will not have the same /dev node each boot, and devices on USB drives will not be static in the system. If you use a UUID mapping, the device's UUID code will be read rather than the /dev node and the drive will be properly assigned during boot.

Try using UUID in the initramfs/initrd and it might get it working. Do this in /etc/fstab also.

Static devices like SATA, IDE, SCSI, and SAS drives will work with labeling because the device node is static to that device. USB, eSATA, and Firewire devices must be set via their UUID code because the device is considered a dynamic device, or removable.
 
Old 09-10-2015, 04:49 AM   #23
brobr
Member
 
Registered: Oct 2003
Location: uk
Distribution: Slackware
Posts: 974

Rep: Reputation: 238Reputation: 238Reputation: 238
Quote:
Originally Posted by ReaperX7 View Post
Try setting it to UUID rather than label. ...
Try using UUID in the initramfs/initrd and it might get it working. Do this in /etc/fstab also.
Hi, Thanks for the tip but it did not change a thing; the boot from the external drive stalls again after loading the initrd.gz with the message that /mnt cannot be found in /etc/fstab.

During my read up I understood that UUID and LABEL (As long as it is unique among all partitions present) would do the same thing, so this lack of result might not be surprising....

Something else is lacking from those initrds I make.....
 
Old 09-10-2015, 01:06 PM   #24
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Did you load the USB drivers into the initrd?
 
Old 09-10-2015, 02:36 PM   #25
brobr
Member
 
Registered: Oct 2003
Location: uk
Distribution: Slackware
Posts: 974

Rep: Reputation: 238Reputation: 238Reputation: 238
yes, cat /proc/modules at the boot prompt when the boot stalls displays the drivers I put in: usb-storage:xhci-hcd:ehci-hcd:ehci-pci:uhci-hcd:ehci-platform:ext4
 
Old 09-10-2015, 11:07 PM   #26
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Left field question, but does it boot with the default Huge kernel?
 
Old 09-13-2015, 03:50 PM   #27
brobr
Member
 
Registered: Oct 2003
Location: uk
Distribution: Slackware
Posts: 974

Rep: Reputation: 238Reputation: 238Reputation: 238
Quote:
Originally Posted by ReaperX7 View Post
does it boot with the default Huge kernel?
OK I made several folders in the ESP on my external drive to test different possiblities:
A) /EFI/BOOT as in the slackware64-current tree
B) /EFI/BOOT2 as in the boot.img provided in the usb-pxe-installers folder
C) /EFI/Slack-huge_b/ , containing a vmlinuz-huge-4.1.6, and initrd.gz (made with mkinitrd -c -k 4.1.6 -r /dev/sdb1 -o initrd-4.1.6-sdb1.gz, a refind-linux.conf with pointers to the internal mSATA drive /dev/sdb1 as root)
D) /EFI/Slack-huge_c/ with the same kernel but with initrd.gz and refind-linux.conf pointing to / on the external usb hard drive (=/dev/sdc7).

This is what I got:
1) with huge kernels from the two uefi-installers: i.e. from usb-pxe-folder or from EFI folder in slackware64-current:
-1a: both boot as if from usb-stick/DVD, into slackware setup
-1b: but when given the option
Code:
boot:huge.s root=/dev/sdc7 rdinit= ro
, or when pointing to the internal drive with root (/dev/sdb1), booting ends with kernel-panic:
Quote:
kernel panic - not syncing VFS: unable to mount root fs on unknown -block(0.0)
this kernel-panic is probably related to a wrong initrd.gz being loaded (see below, point 2a)

-1c: trying to evade setup and the huge.s from usb-pxe-folder, by loading the standard vmlinuz-huge-4.1.6 kernel using boot instructions
Code:
boot: /EFI/Slack-huge_<folder>/vmlinuz-huge-4.1.6 root=/dev/sdb1 rdinit=ro
(i.e. directing to the internal /) works (when starting up from the external hard drive)
-1d: but the same gives above kernel-panic when directing to / on the external drive (root=/dev/sdc7).


2) booting using refind with the standard vmlinuz-huge-4.1.6 (from slackware64/a/kernel-huge-4.1.6.txz)
-2a: by itself from the internal ESP (/dev/sdb1): ends in the same kernel-panic. This because refind does not get enough info (it extracts from an initrd.gz)
-2b: but doing the same including an initrd.gz (for the root= and rootfs= info pointing to the internal /dev/sdb to make refind work): the computer boots.
-2c: also when booting from the ESP on the external hard drive (/dev/sdc) when pointing to the internal drive (/dev/sdb1) for / in the included initrd.gz and refind-linux-conf files, the computer boots fine.


3) Now the rescue-trial: boot to an external root (what I used to be able to do with lilo/MBR and fast eSATA connections when these were on laptops a while back):
-3a: doing the boot from 2c but now pointing to the / on the external hard drive (/dev/sdc7, as defined by edited initrd.gz and refind-linux.conf), ends with same error as when using the vmlinuz-generic-4.1.6 kernel with initrd.gz pointing to this drive as reported in the previous posts (no /mnt in /etc/fstab etc).

Before the above kernel-panic occurs: in all cases the partitions of both internal drives (/dev/sda and /dev/sdb) are recognized; the external (/dev/sdc) is never shown.


4) Btw, booting with the huge kernel from the usb-pxe-folder installer and directing this to / on the internal disk (/dev/sdb1) at the boot prompt:
Code:
Kernel command line: BOOT_IMAGE=dev001:/huge.s  vga=normal load_ramdisk=1 prompt_ramdisk=0 ro printk.time=0 nomodeset SLACK_KERNEL=huge.s ro root=/dev/sdb1 rdinit= ro
goes, but X does not work (EE no screens found) although this is better than doing this with root=/dev/sdc7 as parameter, which gave above kernel panic)

So, things went the same as before with the generic kernel. It shows again that the external drive is not found/available as a device for /, which makes it impossible -it seems- to boot a Slackware system on an external drive using the above methods. I do not know whether this is is according to UEFI-specs but very unhelpful to try to get my internal mSATA repaired that contains the whole system.

I still have to try to do this after unplugging the mSATA (/dev/sdb1) and check whether the external drive is then suddenly used but somehow I doubt this will work.... It probably comes down to having to install slackware on the other internal hard drive but that does defies the idea: having a back-up system ready that can be used by just plugging in a usb-drive.
 
Old 09-13-2015, 05:42 PM   #28
brobr
Member
 
Registered: Oct 2003
Location: uk
Distribution: Slackware
Posts: 974

Rep: Reputation: 238Reputation: 238Reputation: 238
SWITCH USB port. It does not work on USB3, only on USB2!


First I found something very interesting, well it seemed so at the time,

https://bbs.archlinux.org/viewtopic.php?id=183190

This post mentioned a quirk with the exact kind of drive I have been using (Touro from HGST)

added a usb-storage.conf to /etc/modprobe.d/ with contents:
# https://bbs.archlinux.org/viewtopic.php?id=183190
# lsusb -v
# Bus 004 Device 003: ID 4971:1012 SimpleTech
## Device Descriptor:
## bLength 18
## bDescriptorType 1
## bcdUSB 3.00
## bDeviceClass 0 (Defined at Interface level)
## bDeviceSubClass 0
## bDeviceProtocol 0
## bMaxPacketSize0 9
## idVendor 0x4971 SimpleTech
## idProduct 0x1012
## bcdDevice 0.00
## iManufacturer 10 HGST
## iProduct 11 Touro Mobile Pro
## iSerial 3 21001311260002300213
## bNumConfigurations 1
#
options usb-storage quirks=0x4971:0x1012:u

made a new initrd.gz with /etc/modprobe.d/usb-storage.conf copied to /boot/initrd.tree/lib/modprobe.d/

but this did not make a difference.

What made it work was plugging the drive into a USB2 port; the USB3 port I used before did not support the procedure.
Pfui, ......
 
Old 09-13-2015, 07:59 PM   #29
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
I suspect the initrd is missing the btrfs module and/or tools needed to initialize with...
 
Old 09-14-2015, 06:05 AM   #30
brobr
Member
 
Registered: Oct 2003
Location: uk
Distribution: Slackware
Posts: 974

Rep: Reputation: 238Reputation: 238Reputation: 238
Sure, something is missing, maybe the [SOLVED] tag
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Additional SATA disk (storage only) -> no /sbin/init found at boot syvy Slackware 6 09-29-2011 11:15 PM
Ubutnu won't boot. Error: Target file system doesn't have /sbin/init. No init found. Zeljka_Lin Linux - Newbie 9 05-02-2011 06:56 AM
No /sbin/init found on rootdev... mkinitrd problem? a_priebe47 Slackware 6 05-15-2008 09:49 AM
can't compile kernel 2.6.23.8 ERROR: no /sbin/init found on rootdev tommcd Slackware 18 11-24-2007 09:32 PM
deb sarge: /sbin/init 432 dev/console file not found Shankarrajus Debian 2 07-05-2006 11:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration