Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
 
Reply to this topicStart new topic
> Reinstalling Grub
Stevey_G
post Jan 27 2005, 08:12 PM
Post #1


./configure
***

Group: Members
Posts: 58
Joined: 23-February 04
Member No.: 2,448



Yep thats right, Ive got the age old problem of a dual boot system which has overwritten GRUB when reinstalling windows. I have booted the machine in rescue mode and mounted my linux system at /dev/hda3, in the directory /mnt/foo. But when I try to chroot to /mnt/foo it says /bin/sh has an i/o error? Any ideas? Obviosuly I cant reinstall GRUB if I cent get into my system.

Cheers Chaps
Go to the top of the page
 
+Quote Post
Corey
post Jan 27 2005, 09:12 PM
Post #2


Its GNU/Linuxhelp.net
*******

Group: Admin
Posts: 1,254
Joined: 21-September 02
From: St John's, Newfoundland, Canada
Member No.: 3



i'm not quite sure, but you may need to mount the proc filesystem as well:

QUOTE
mount /dev/hda3 /mnt/foo
mount -t proc none /mnt/foo/proc
chroot /mnt/foo /bin/bash
source /etc/profile


--------------------
Corey Quilliam
(former) Linuxhelp.ca Administrator
cquilliam-AT-gmail-dot-com

Want to help out Linuxhelp.net? Check out our Linuxhelp Wiki and see if there are some articles you would like to submit!!

--
Ubuntu 8.04 64-bit - Work Laptop (HP-Compaq NC6400 Core2)
Kubuntu 8.04 64-bit - Desktop (HP m8120n QuadCore)
Ubuntu 6.04 - Server (I'm not upgrading this baby until support runs out in 2012) (Some old POS dell)
Go to the top of the page
 
+Quote Post
Stevey_G
post Jan 28 2005, 07:24 AM
Post #3


./configure
***

Group: Members
Posts: 58
Joined: 23-February 04
Member No.: 2,448



Still get the same I/O error unsure.gif
Go to the top of the page
 
+Quote Post
michaelk
post Jan 28 2005, 07:27 AM
Post #4


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,797
Joined: 23-January 03
Member No.: 360



BTW what distribution are you running?
Go to the top of the page
 
+Quote Post
Stevey_G
post Jan 28 2005, 08:33 AM
Post #5


./configure
***

Group: Members
Posts: 58
Joined: 23-February 04
Member No.: 2,448



Fedora Core 3 - X86-64 however Im booting using a core 1 cd then using the rescue console. Will this make a difference?
Go to the top of the page
 
+Quote Post
michaelk
post Jan 28 2005, 09:52 PM
Post #6


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,797
Joined: 23-January 03
Member No.: 360



I wouldn't think so but then I do not have a 64bit PC yet.

It has been awhile... but I thought that rescue mode will automatically mount the root partition at /mnt/sysimage. Maybe this might be causing the error.
Go to the top of the page
 
+Quote Post
Stevey_G
post Jan 29 2005, 11:03 AM
Post #7


./configure
***

Group: Members
Posts: 58
Joined: 23-February 04
Member No.: 2,448



Ok. the Fedora installation is now mounted at /mnt/sysimage for definite, but if i try to chroot /mnt/sysimage OR chroot /mnt/sysimage /bin/bash I still get an I/O error. Im assuming I cant just do grub-install /dev/hda from the current shell root as it will attempt to reinstall to the wrong drive?
Go to the top of the page
 
+Quote Post
michaelk
post Jan 29 2005, 11:21 AM
Post #8


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,797
Joined: 23-January 03
Member No.: 360



Do you have any problems accessing data on the root partition via /mnt/sysimage?
Go to the top of the page
 
+Quote Post
Stevey_G
post Jan 30 2005, 02:33 PM
Post #9


./configure
***

Group: Members
Posts: 58
Joined: 23-February 04
Member No.: 2,448



Nope.
Go to the top of the page
 
+Quote Post
Stevey_G
post Mar 3 2005, 07:56 AM
Post #10


./configure
***

Group: Members
Posts: 58
Joined: 23-February 04
Member No.: 2,448



Right!!!! I have this bloody problem yet again. Basically this time though, if i chroot to /mnt/sysimage and run grub-install /dev/sda, it cannot find the block device /dev/sda. However, if i run the command without changing the root, it recognises the device BUT the command isnt recognised, because there is no sbin. Any clever ideas? It appears that /mnt/sysimage/dev is empty. Can I symlink /dev/sda to /mnt/sysimage/dev?
Go to the top of the page
 
+Quote Post
michaelk
post Mar 3 2005, 08:03 AM
Post #11


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,797
Joined: 23-January 03
Member No.: 360



I do not see why creating a link will not work.
Go to the top of the page
 
+Quote Post
Stevey_G
post Mar 4 2005, 07:42 AM
Post #12


./configure
***

Group: Members
Posts: 58
Joined: 23-February 04
Member No.: 2,448



Sorted it! biggrin.gif
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 23rd October 2017 - 08:41 AM