DebianThis forum is for the discussion of Debian Linux.
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 have a system with voyage linux, and i wanted to put a regular debian install on the same machine, also. So i followed the install CD.. resized the exisiting partition, made new ones, all went well. Until GRUB.. i selected to install it (assuming it would pick up on the fact there already was a GRUB install..
as it picked up 'unknown linux distro' i went ahead and installed it to the MBR. Now my HDD doesn't boot. What do i do???
Do you have some liveCD from which you can repair grub? If you do, try the following from the liveCD:
Code:
mkdir /mnt/debian
mount /dev/your_debian_partition /mnt/debian
mount -o bind /dev /mnt/debian/dev
mount -o bind /sys /mnt/debian/sys
mount -t proc none /mnt/debian/proc
chroot /mnt/debian /bin/bash
update-grub2
grub-install /dev/sda
You could also download Super Grub Disc, and try to fix your grub install from there (I haven't used it, but I've read that it's very handy for these cases).
Regards.
Last edited by Hungry ghost; 12-03-2011 at 09:18 PM.
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628
Rep:
Quote:
Originally Posted by odiseo77
Do you have some liveCD from which you can repair grub? If you do, try the following from the liveCD:
Code:
mkdir /mnt/debian
mount /dev/your_debian_partition /mnt/debian
mount -o bind /dev /mnt/debian/dev
chroot /mnt/debian /bin/bash
update-grub2
grub-install /dev/sda
You could also download Super Grub Disc, and try to fix your grub install from there (I haven't used it, but I've read that it's very handy for these cases).
Regards.
Use the directions above. Much better choice than third party tools.
Should work with either of your installs but I would go with the Debian as being more reliable than voyage that does not seem to be designed for real computer use anyway so may have some problems with file system paths.
I have not looked at voyage seriously so may just be blowing that out of some unnamed orifice. I would not trust it anyway for boot duty.
The command "update-grub2" is obsolete, by the way. It is just "update-grub". Both will still work but the "grub2" usage ended 2 years ago when support for grub-legacy was dropped.
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628
Rep:
Quote:
Originally Posted by 62chevy
In Sid update-grub2 is a symbolic link to update-grub. In Squeeze I still have both in /usr/sbin.
If you try "update-grub" in Sid it will work fine. This is a native command for grub.
Documentation is a problem with grub-pc an Debian, much as I love it, is not always on top of the newest things. It is a surprise to me just how little is actually known about grub-pc and how to use it.
On the other hand I know that it is a moving target and that I am way behind the thing too. One of these days I really need to spend a couple, three days and catch up, probably totally screwing my grub a few times.
If you try "update-grub" in Sid it will work fine. This is a native command for grub.
Documentation is a problem with grub-pc an Debian, much as I love it, is not always on top of the newest things. It is a surprise to me just how little is actually known about grub-pc and how to use it.
On the other hand I know that it is a moving target and that I am way behind the thing too. One of these days I really need to spend a couple, three days and catch up, probably totally screwing my grub a few times.
One of my biggest complaints with Debian is the Documentation is either old or not there. Some docs date back to Sarge.
which is written by the guy guilty of most of the Ubuntu documentation. I prefer the forum thread. Only the first post is needed as he keeps it up to date.
It also has valuable links at the end. Many are other, specialty threads by the same guy, drs305, who was one of us that got hit at Ubuntu 9.10 alpha2 time with grub2 and NO documentation. That was fun.
The post linked above was actually started in that testing cycle put together with all the discoveries by those of us that were working on grub along with his extensive experimentation. He continues to experiment extensively and knows things that the Grub guys are not real sure about.
His thread on passwords in grub is worth reading for the paranoid.
You can also learn to mess with all the scripts in grub to get just what you want. He can pretty much get it to sit up and beg.
I stick with messing with symbolic menu entries and have no trouble with booting to a HDD that is really screwed and recovered through testdisk but can't be read by e2fscheck or os-prober. Generated menu entries do not work there at all.
Symbolic ones do.
for Debian branch Linux this works great if edited to your drive and partition table;
Code:
echo "Adding Squeezy on sda7" >&2
cat << EOF
menuentry "Squeezy on sda7" {
set root=(hd0,7)
linux /vmlinuz root=/dev/sda7 ro quiet
initrd /initrd.img
}
EOF
This works for RH branch Linux;
Code:
echo "Adding Squeezy on sda7" >&2
cat << EOF
menuentry "Mandriva-Gnome" {
linux (hd0,12)/boot/vmlinuz
initrd (hd0,12)/boot/initrd.img
}
Add to your /etc/grub.d/40_custom file and save as 06_custom after editing. Anything can be used that you want between the "" marks. The first set is what you see in terminal when running "update-grub". The second is what you see on your screen menu.
The position of the { and } is critical.
If you have a long instruction string in the Debian branch entry do not have line wrapping enabled in you test editor.
These entries will always boot to the newest kernel on the defined partition.
The RH example is old (09). Don't even have Mandriva on here. I just used it last week, edited for my new install of an extremely bloated PCLOS FullMonty edition. Works like a charm.
The command "update-grub2" is obsolete, by the way. It is just "update-grub". Both will still work but the "grub2" usage ended 2 years ago when support for grub-legacy was dropped.
Yes, I know. For some reason, I have the custom of using update-grub2 instead of just update-grub. Maybe a reminiscence of old times when grub2 started being implemented
To the OP: I forgot, the above commands won't work because you will need at least /sys mounted (and probably /proc as well), so try only one of the following options:
a) Follow the commands above but execute these couple of commands before the chroot command:
Code:
mount -o bind /sys /mnt/debian/sys
mount -t proc none /mnt/debian/proc
or b) execute the following (with the debian partition mounted on /mnt/debian):
(Sorry for the misleading advice in my first post, I forgot you need /sys and /proc mounted on the chrooted Debian in order for the commands to work. I edited my post to include these couple of commands).
Regards.
Last edited by Hungry ghost; 12-03-2011 at 09:19 PM.
wow I wish I always got this many responses! Anyway, after grub-install /Dev/sda I get;
this ms-dos style partition label has no post mbr gap embedding won't be possible. .. grub can only be installed using blocklists --unreliable and discouraged. use --force? ?
well I caved and ran it with --force. it said no problems occurred. however, my system still fails to boot, still complaining 'hard disk boot sector invalid'.
hmm, strange. Could you download this script, uncompress it, give it execution permissions (chmod +x boot_info_script.sh) and run it like this?: ./boot_info_script.sh. Then please, attach the RESULTS.txt file here, so we can see it. One question: did you create an extra /boot partition for Debian, or only a root (/) partition? (In case you have created an extra /boot partition, which one is it?)
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628
Rep:
Quote:
Originally Posted by odiseo77
hmm, strange. Could you download this script, uncompress it, give it execution permissions (chmod +x boot_info_script.sh) and run it like this?: ./boot_info_script.sh. Then please, attach the RESULTS.txt file here, so we can see it. One question: did you create an extra /boot partition for Debian, or only a root (/) partition? (In case you have created an extra /boot partition, which one is it?)
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628
Rep:
Ah, the wonders of using an OS made for imbedded use on a pc. This looks like fun.
You have a completely screwed grub installation and it will take some thought to straighten this out.
It appears that you have a mixed up MBR thinking that you are using grub-legacy while attempting to use the menu from grub-pc.
How this was done is beyond me but I would really like to know. Trying to duplicate that may be a good idea on another box so that a bug could be filed with what ever caused it. Has to be one grub or the other.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.