Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I recently decided to remove Windows Vista from my dual-boot and replace it with Windows XP. Originally, I was using the Vista boot loader to dual-boot between Linux and Vista. This required to have grub actually installed on my Linux partition and then the Vista boot loader booted into that to get to Linux. After I installed XP, it put on the XP boot loader. When I used a live CD to try to reinstall GRUB, it doesn't work. Specifically, when I attempt to use the root command to get to my Linux partition, I get Error 23. I'm not exactly sure what that means. I know Linux is on the first partition of my hard drive which is (hd0,0). Ever time I try to use grub-installer or setup, it gives me errors. I'm wondering if it might have something to do with the grub installation I had to put on the partition for the Vista boot loader. Any help or suggestions would be greatly appreciated.
Thanks
Distribution: Ubuntu/Debian, CentOS, RHEL, FreeBSD, OS X
Posts: 75
Rep:
Quote:
Originally Posted by Darth Cupcake
I recently decided to remove Windows Vista from my dual-boot and replace it with Windows XP. Originally, I was using the Vista boot loader to dual-boot between Linux and Vista. This required to have grub actually installed on my Linux partition and then the Vista boot loader booted into that to get to Linux. After I installed XP, it put on the XP boot loader. When I used a live CD to try to reinstall GRUB, it doesn't work. Specifically, when I attempt to use the root command to get to my Linux partition, I get Error 23. I'm not exactly sure what that means. I know Linux is on the first partition of my hard drive which is (hd0,0). Ever time I try to use grub-installer or setup, it gives me errors. I'm wondering if it might have something to do with the grub installation I had to put on the partition for the Vista boot loader. Any help or suggestions would be greatly appreciated.
Thanks
btw, I'm using 64-bit Ubuntu on a laptop.
Are you using the Grub Super Disk? If not this might fixed your problem.
If the grub shell from Live-CD Linux can't see the partition, then how is Super-GRUB going to help?
error 23 means there was an error in parsing a command. Make sure your "root" command is like this: "root (hd0,0)" where "0,0" means "first drive, first partition" http://www.gnu.org/software/grub/man...index.html#Top
Running from the live CD, give us also the output of "fdisk -l"
Quote:
Ever time I try to use grub-installer or setup, it gives me errors.
I figured Super GRUB Disk wouldn't be able to do anything a live CD can't, but thank you anyway alpha01.
here's my output on the live CD:
ubuntu@ubuntu:~$ sudo fdisk -l
Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000080
Device Boot Start End Blocks Id System
/dev/sda1 1 6989 56139111 83 Linux
/dev/sda2 * 6990 13995 56275695 7 HPFS/NTFS
/dev/sda3 13996 14593 4803435 5 Extended
/dev/sda5 13996 14593 4803403+ 82 Linux swap / Solaris
ubuntu@ubuntu:~$ grub
Probing devices to guess BIOS drives. This may take a long time.
[ Minimal BASH-like line editing is supported. For
the first word, TAB lists possible command
completions. Anywhere else TAB lists the possible
completions of a device/filname. ]
grub> root (hd0,0)
root (hd0,0)
Error 21: Selected disk does not exist
grub> root (sd0,0)
root (sd0,0)
From your last post, it looks like you are getting to the Grub prompt (grub>) with the live CD, but I'm confused about the entries you posted after that? When you get to the grub prompt you type: root (hd0,0)##hit the enter key, then type: setup (hd0)##hit the enter key, type: quit ##Hit the enter key. Should be done.
From your last post, it looks like you are getting to the Grub prompt (grub>) with the live CD, but I'm confused about the entries you posted after that? When you get to the grub prompt you type: root (hd0,0)##hit the enter key,
Did you notice that that is exactly what he did??
Darth;
Your second attempt (root (sd0,0)) is invalid---GRUB uses only the hdx,y notation.
For some reason, your /dev/sda1 is not being recognized as hd0,0. You can try hd0,1 or maybe hd1,0
Also try grub's "find" command.
I am not at a computer with GRUB installed, so I can't do any experiments.
Error 15: File not found
grub> find /boot/grub/vmlinuz
find /boot/grub/vmlinuz
Error 15: File not found
grub> root (hd0,1)
root (hd0,1)
Error 21: Selected disk does not exist
grub> root (hd1,0)
root (hd1,0)
Error 21: Selected disk does not exist
The contents of /boot/grub on my linux partition:
default installed-version minix_stage1_5 xfs_stage1_5
device.map jfs_stage1_5 reiserfs_stage1_5
e2fs_stage1_5 menu.lst stage1
fat_stage1_5 menu.lst~ stage2
I just had to type 'sudo grub' rather than 'grub' (I could have sworn I tried that before). I feel a little dumb right now. Thanks everyone for helping out.
Don't feel dumb!! This is not the first example of a program that wants root powers, but will sit in stony silence when you try to run it as a mere mortal.
The candidates for dummy include:
the author of the SW.
all the experts that assumed you were running as root, but did not say anything.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.