LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
LinkBack Search this Thread
Old 05-06-2008, 01:58 AM   #1
newtovanilla
Member
 
Registered: Apr 2008
Posts: 267

Rep: Reputation: 30
Question Command help to mount INITRD.img and add files to it to create bootloader


What is the correct way to mount an initrd.img file with the "mount" command and the "-o loop" option? I am newbie to Linux and to commands. I tried this:

mount -o loop initrd.img /tmp

This is error:
Quote:
mount: you must specify the filesystem type
Could you tell me the correct way to use this "mount -o loop" command with this "initrd.img" file? I want to be able to add some files to it.
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 05-06-2008, 02:06 AM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,697

Rep: Reputation: 287Reputation: 287Reputation: 287
This might help.
 
Old 05-07-2008, 03:54 AM   #3
newtovanilla
Member
 
Registered: Apr 2008
Posts: 267

Original Poster
Rep: Reputation: 30
Smile

Thank you for the comment. That was useful to provide a link to a web about initrd.

I also found this helpful:

 
Old 02-24-2011, 05:37 PM   #4
mcurran
LQ Newbie
 
Registered: Jan 2010
Location: Massachusetts
Distribution: LMDE
Posts: 4

Rep: Reputation: 2
if you wanna do it the simple way, like your original idea; you use mount -t sysfs

for example:

#make a directory to mount on
mkdir temp

#mount the file on temp...
mount -t sysfs /initrd.img /temp -o loop
 
2 members found this post helpful.
Old 05-02-2012, 10:18 PM   #5
bokusama
LQ Newbie
 
Registered: Apr 2012
Posts: 3

Rep: Reputation: 0
Question

Been a while since that last post, but mcurran's method gave me a different file structure than newtovanilla's helpful link.

How does that work?

sysfs:
block class devices fs kernel power
bus dev firmware hypervisor module

gunzip-cpio:
run lib64 sbin bin lib proc root
sys tmp usr var dev init sysroot etc

I used find and the directories obtained with cpio are not found inside the sysfs mount. A quick search on Google returned a rather confusing explanation of sysfs -confusing as to how it relates to this situation.

This is now a question on theory, in practice the gunzip-cpio combo is just what I needed so thanks for that link.
 
Old 07-01-2013, 04:23 PM   #6
ahavapeng
LQ Newbie
 
Registered: Jul 2013
Posts: 1

Rep: Reputation: Disabled
Smile The sysfs solution is incorrect

Note that the following gives the same result:

mount -t sysfs /inventAnonExistentFilename.whatever targetDirectory/

adding -o loop also has no effect on the behavior.
 
  


Reply

Tags
initrd, mount


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to create initrd.img when compiling 2.6.16.20 for i386 on AMD 64 or whatever penguin123 Linux - Kernel 4 10-21-2008 07:00 PM
How to create new initrd.gz (or initrd.img) file? kkpal Programming 2 12-10-2007 08:38 AM
how do I create an initrd.img file? aquaboot Debian 2 11-07-2007 05:40 PM
Add new cciss driver module to initrd.img ,stage2.img kunalroy2002 Linux - Software 4 09-25-2007 12:09 AM
Failed to symbolic-link boot/initrd.img-2.6.18-4-486 to initrd.img Scotteh Linux - Software 8 06-01-2007 11:24 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration