Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.


  Search this Thread
Old 03-05-2015, 02:13 PM   #1
LQ Newbie
Registered: Jan 2014
Posts: 14

Rep: Reputation: Disabled
Mounting root filesystem in custom initramfs : No such file or directory

I have a compiled a custom 3.10 kernel with just the essential drivers in it. I also have a Centos initramfs with the basic initial file system to go along with it. It boots fine and I can get the networking up and running. I intend to work in this embedded type of environment so I do not need any additional utilities.
I have used "devtmpfs" to populate my /dev directory and I can see all my /dev/sda partitions there. But when I say "mount -o ro /dev/sda1 /mnt", I get an error: No such file or directory.
I built the hard disk SATA drivers (libata) into the kernel. I'm not sure if I need something else too.
I have a very simple init script, exactly the one shown here : . Is there any chance I overlooked something? Am I missing any crucial drivers? It's driving me crazy that something so simple has me stuck for such a long time.
Old 03-05-2015, 07:47 PM   #2
Keith Hedger
Senior Member
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Linux From Scratch, Slackware64, Partedmagic
Posts: 3,057

Rep: Reputation: 831Reputation: 831Reputation: 831Reputation: 831Reputation: 831Reputation: 831Reputation: 831
I think this seems more likely to be a thread for the centos forums, but does /mnt exist?
Old 03-05-2015, 09:32 PM   #3
LQ Newbie
Registered: Jan 2014
Posts: 14

Original Poster
Rep: Reputation: Disabled
Yes, I created the /mnt directory in the correct place.
I feel that this question is distro-agnostic and it has to mostly do with creating a minimal Linux from scratch, hence it would be better in this forum.
Old 03-06-2015, 04:03 AM   #4
LQ Newbie
Registered: Jan 2014
Posts: 14

Original Poster
Rep: Reputation: Disabled
Non-intuitive workaround again!
My disk filesystems are ext3. I compiled the ext3 and ext4 drivers into the kernel and executed "mount -t ext3 /dev/sda1 /mnt". It gave me the error : "no such device".
Then I compiled the ext2 drivers in as well just to be sure and executed "mount -t ext2 /dev/sda1 /mnt" . To my surprise, it mounted the disk in ext2 and gave a warning "mounting ext3 filesystem as ext2".
Not really a solution but it gets the job done.


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
Checking root filesystem fails : No such file or directory while opening /dev/hda2 ujjwalKumar Linux - Newbie 12 12-26-2012 03:29 AM
how does mounting a root filesystem actually work? ben-linus Linux - Embedded & Single-board computer 4 11-23-2011 09:32 PM
Booting a custom kernel with a new root filesystem LinuxNewman Linux - General 10 04-19-2009 10:53 PM
Looking for a way to have a portable filesystem (or mounting without root) dkulchenko Linux - General 2 02-27-2009 08:45 AM
Root filesystem mounting as Read-Only paddyjoy Linux - Newbie 11 03-21-2006 03:32 PM > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 11:44 AM.

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