LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-13-2008, 10:25 PM   #1
jazzor
Member
 
Registered: Apr 2007
Posts: 41

Rep: Reputation: 16
busybox initramfs read only


Hi. Im trying to construct a initramfs bootup, so far everything works fine except that the rootfs stays read only no matter what i do.

this is the start of the init script:

Code:
#!/bin/sh
export PATH=.:/bin:/sbin

mount -t proc proc /proc
mount -t sysfs sysfs /sys
mount -o remount,rw /

echo 0 >/proc/sys/kernel/printk
mdev -s

mkdir mountpoint
...
at the point where mdev -s is run, the filesystem is read only again and thus, it wont find the root device (since it cannot create /dev nodes).

Im using busybox 1.12.2.

Is there any particular configuration I need for busybox to make it mount read write all the time?
 
Old 11-13-2008, 11:59 PM   #2
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
Remember you probably do not have an fstab file at this point in time, not to mention 'mount' is provided by busybox and may have further limitations - such as not ever looking for a file like 'fstab' to parse.

So one problem is that you need to be more explicit about what is mounted and where. Of course, your '/dev' filesystem likely contains only 'console' and 'null' - which leads to a multitude of other problems.

What I would recommend is that you take apart an existing initramfs image and read through the init script. You will find (in most cases) that numerous other scripts are invoked to help set things up (doing things like providing your nice color entries as you see those "starting", "OK", and "failed" messages). Along the way, 'tmpfs' is used to create essential entries like the initial 'dev' filesystem. I can't explain everything in a post, so it's best to just read through those other existing init scripts and learn the details of how to set up dev, proc, udev, mount the root filesystem, pivot to the real init ...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
"Busybox" shows up with initramfs prompt on usb installed Ubuntu 8.10 and 8.04 lumix Linux - Newbie 3 10-29-2008 01:16 PM
initramfs !! Ashhere Linux - Newbie 3 08-24-2008 09:00 AM
Initramfs on boot up BACTRATE Ubuntu 7 06-10-2008 02:33 PM
update-initramfs -u Geminias Linux - Newbie 1 07-30-2007 04:04 AM
what is initramfs and how can I edit one? mangolicious Linux - Software 2 03-16-2005 10:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:50 AM.

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