LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   i want to load initrd image from /boot (https://www.linuxquestions.org/questions/linux-newbie-8/i-want-to-load-initrd-image-from-boot-757270/)

miteshpant 09-23-2009 09:45 AM

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

MensaWater 09-23-2009 10:07 AM

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.

btncix 09-23-2009 10:24 AM

Please don't double post.

Have you tried using a livecd like a few others already recommended?

miteshpant 09-23-2009 10:34 AM

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

miteshpant 09-23-2009 05:45 PM

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


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