All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Jackson <mpfj@mimc.co.uk>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: linux-kernel@vger.kernel.org, mrustad@gmail.com
Subject: Re: Help using initramfs
Date: Wed, 26 Nov 2008 10:51:22 +0000	[thread overview]
Message-ID: <492D2A2A.905@mimc.co.uk> (raw)
In-Reply-To: <492C676A.6020901@zytor.com>

H. Peter Anvin wrote:
> Mark Jackson wrote:
>> I'm not sure if this is the correct place to be asking, but I've spend a
>> while searching Google and am still no wiser.
>>
>> I'm looking to use initramfs to create a simple bootable linux distro
>> for our AVR32 based boards.
>>
>> However, I have hit a brick wall at nearly the first step.
>>
>> So far I've managed to create a "bloated" kernel containing the
>> initramfs directory structure and I'm just trying to get a simple "Hello
>> World" test app running.
>>
>> The kernel boots, and the app runs, but I get no output on the console.
>>
> 
> Make sure /dev/null, /dev/zero, and *especially* /dev/console exists in
> your initramfs.

Aha ... after much head scratching, I now understand my error.

As you suggested, I hadn't correctly made my /dev entries.

Thanks.

My next problem is this ... below is a copy of my /init script ...

#!/bin/sh
#Mount things needed by this script
mount -t proc proc /proc
mount -t sysfs sysfs /sys
mdev -s
echo "wibble"
echo "qwerty" > /dev/console
exec /sbin/init
exit 0

And this is the console output ...

mount: permission denied. (are you root?)
mount: permission denied. (are you root?)
mdev: /sys/block: No such file or directory
mdev: /sys/class: No such file or directory
wibble
qwerty
Mounting virtual filesystems:
mount: permission denied. (are you root?)
   mount /proc failed
mount: permission denied. (are you root?)
   mount /sys failed
mount: permission denied. (are you root?)
   mount /dev failed
mount: permission denied. (are you root?)
   mount /config failed
mount: permission denied. (are you root?)
   mount /tmp failed
mount: permission denied. (are you root?)
   mount /var/run failed
mount: permission denied. (are you root?)
   mount /var/log failed
   WARNING: not able to mount all virtual file systems
Setting up mdev: eth0: link up (100/Full)
/etc/init.d/S01hotplug: line 11: can't create /proc/sys/kernel/hotplug: 
nonexistent directory
failed
Setting hostname: hostname: permission denied. (are you root?)
failed
Starting syslogd: done
Log messages to syslog: /etc/init.d/S08syslog: line 24: can't create 
/proc/sys/kernel/printk: nonexistent directory
failed
Starting klogd: done
Probing modules:
Mounting local filesystems: mount: mounting /dev/mmcblk0 on 
/media/sdcard failed: No such file or directory
failed
Network interfaces: ifconfig: SIOCSIFADDR: Permission denied
ifconfig: SIOCSIFFLAGS: Permission denied
failed
/etc/init.d/S50lighttpd: line 4: /usr/sbin/lighttpd: not found
can't open /dev/ttyS1: No such file or director
can't open /dev/ttyS1: No such file or director
can't open /dev/ttyS1: No such file or director

Does /init not inherently run as root ?

If not, how do I fix the problem ?

Mark

  reply	other threads:[~2008-11-26 10:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-25 20:38 Help using initramfs Mark Jackson
2008-11-25 21:00 ` H. Peter Anvin
2008-11-26 10:51   ` Mark Jackson [this message]
2008-11-26 11:27     ` Mark Jackson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=492D2A2A.905@mimc.co.uk \
    --to=mpfj@mimc.co.uk \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mrustad@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.