LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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
  Search this Thread
Old 09-23-2009, 09:45 AM   #1
miteshpant
LQ Newbie
 
Registered: May 2009
Posts: 24

Rep: Reputation: 0
Smile i want to load initrd image from /boot


hi ,
I am back witha problem
my fstab is deleted
i have my / on /dev/sda3
boot on /dev/sda2
now since while logging on to single user mode i cannot edit /etc to create fstab
i ran
mount /dev/sda2 /boot
zcat /boot/initrd-2.6..... | cpio --extract --make-directories --verbose
this extracted the initrd on /boot
now i created /boot/etc/fstab
can i now enter the rw mode ..

for notice
while on sinle user mode
mount -o remount,rw /dev/sda3 / is not working ( even when i am root )
please assist
thanks
 
Old 09-23-2009, 10:07 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Unmount the /boot and make sure there are no other submounts on / then try your remount again. If it works then remount /boot on top of it.
 
Old 09-23-2009, 10:24 AM   #3
btncix
Member
 
Registered: Aug 2009
Location: USA
Posts: 141

Rep: Reputation: 26
Please don't double post.

Have you tried using a livecd like a few others already recommended?
 
Old 09-23-2009, 10:34 AM   #4
miteshpant
LQ Newbie
 
Registered: May 2009
Posts: 24

Original Poster
Rep: Reputation: 0
i am sorry for reposting , iam new here so was unable to locate the old post ,, now i know it , thanks anyways

trying with your solution
i can boot withthe cd but just wanted to work the other way round if possible
 
Old 09-23-2009, 05:45 PM   #5
miteshpant
LQ Newbie
 
Registered: May 2009
Posts: 24

Original Poster
Rep: Reputation: 0
hey every one
i got the solution without using the cd . thsi is what i did
1. logged in emergency mode
2.mount /dev/sda2 /boot
3.cd /dev
4.mkdir tmp
5.cp /boot/initrd(xyz).img /dev/tmp/.
6.cd /tmp
7.mkdir tmp2
8.gunzip -v -S .img /dev/tmp/initrd(xyz).img // THIS WILL UNZIP THE FILE
9.cd tmp2
10.cpoi -id < ..initrd(xyz) // THIS WILL EXTRACT THE INITRD FILE
11. make the fstab in etc directory thus extracted here
12. edit the init file to mount the / partion and the swap partition
13. find . | cpoi --create --format='newc' > /dev/tmp/newinitrd
14. gzip newinitrd // this will create neinitrd.gz
15. cd ..
16. mv newinitrd.gz initrd(xyz).img
17. cp /dev/tmp/initrd(xyz).img /boot/initrd(xyz).img
18. reboot the system
19. work as you want
 
  


Reply



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
qemu boot of live USB image hands loading initrd.img poblano Linux - Software 1 03-09-2008 09:45 AM
LFS: Cannot boot : Need initrd image? michealoc Linux From Scratch 0 10-11-2007 07:53 AM
if I boot from slack-CD1, how to load initrd image file jiawj Slackware 6 03-31-2005 03:05 PM
What's initrd image? Nerox Linux - Newbie 2 08-25-2004 04:53 PM
Redhat hangs on boot when initrd should load brianinswfla Linux - General 2 05-10-2003 06:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:32 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