WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Booting using grub and hard drive - /sbin/init fails  (Read 1658 times)

Offline clauder

  • Newbie
  • *
  • Posts: 11
Booting using grub and hard drive - /sbin/init fails
« on: March 15, 2020, 01:05:28 PM »
Hi,
I am trying to have a simple (no GUI, etc.) system to boot off a hard drive. I dump the content of core.gz onto a local disk partition, created the /boot directory and copy the kernel. I also installed grub and setup a minimal grub.cfg in /boot/grub

The setup boots the kernel, which finds its root FS (on the hard drive) and start /sbin/init. However /sbin/init's action (mount) complains about not being root (how can that be??) and about not finding /proc/cmdline.

In the end, there is no shell nor command prompt .....  :'(

I do not see any error in the kernel's output.

I redirected the output to a serial port so here is the content after /sbin/init starts

init started: BusyBox v1.29.3 (2018-12-19 15:29:37 UTC)
mount: you must be root
mount: you must be root
mount: you must be root
mount: you must be root
cat: can't open '/proc/cmdline': No such file or directory


I just can't understand why /sib/init appears to be not root, how can that be? Is it a cause or just a symptom?

Here the output of grub.cfg:

set timeout=3
set root='hd0,msdos1'
menuentry 'Boot TinyCore' {
    linux /boot/vmlinuz  root=/dev/sda1 rw console=tty0 console=ttyS0,115200n8
}




Offline clauder

  • Newbie
  • *
  • Posts: 11
Re: Booting using grub and hard drive - /sbin/init fails
« Reply #1 on: March 15, 2020, 03:13:37 PM »
Ok,

the message "you must be root" is a bit misleading. In fact, I had some directories that were not owned by root. Changing them to be owned by root fix the issue.