Debian This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
|
12-03-2011, 10:59 AM
|
#1
|
|
Member
Registered: Oct 2011
Distribution: debian
Posts: 107
Rep: 
|
Grub install f up
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???
|
|
|
|
12-03-2011, 11:45 AM
|
#2
|
|
Member
Registered: Dec 2004
Location: Caracas, Venezuela
Distribution: Debian Sid, LMDE
Posts: 825
Rep: 
|
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 odiseo77; 12-03-2011 at 09:18 PM.
|
|
|
|
12-03-2011, 12:55 PM
|
#3
|
|
Senior Member
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing
Posts: 1,673
|
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.
Here is a link to more complete instructions;
https://help.ubuntu.com/community/Gr...stalling_GRUB2
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.
|
|
|
|
12-03-2011, 01:19 PM
|
#4
|
|
Member
Registered: Mar 2002
Location: West (By God) Virginia
Distribution: Debian Squeeze - Sid
Posts: 281
Rep:
|
In Sid update-grub2 is a symbolic link to update-grub. In Squeeze I still have both in /usr/sbin.
|
|
|
|
12-03-2011, 03:54 PM
|
#5
|
|
Senior Member
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing
Posts: 1,673
|
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.
|
|
|
|
12-03-2011, 05:03 PM
|
#6
|
|
Member
Registered: Mar 2002
Location: West (By God) Virginia
Distribution: Debian Squeeze - Sid
Posts: 281
Rep:
|
Quote:
Originally Posted by widget
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.
|
|
|
|
12-03-2011, 07:06 PM
|
#7
|
|
Senior Member
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing
Posts: 1,673
|
Quote:
Originally Posted by 62chevy
One of my biggest complaints with Debian is the Documentation is either old or not there. Some docs date back to Sarge.
|
Grub has not done too well themselves with documentation.
The best is in the Ubuntu community documentation and
http://ubuntuforums.org/showthread.php?t=1195275
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.
|
|
|
|
12-03-2011, 07:06 PM
|
#8
|
|
Member
Registered: Dec 2004
Location: Caracas, Venezuela
Distribution: Debian Sid, LMDE
Posts: 825
Rep: 
|
Quote:
Originally Posted by widget
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
Cheers.
|
|
|
|
12-03-2011, 09:13 PM
|
#9
|
|
Member
Registered: Dec 2004
Location: Caracas, Venezuela
Distribution: Debian Sid, LMDE
Posts: 825
Rep: 
|
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):
Code:
grub-install --root-directory=/mnt/debian /dev/sda
(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 odiseo77; 12-03-2011 at 09:19 PM.
|
|
|
|
12-04-2011, 04:17 PM
|
#10
|
|
Member
Registered: Oct 2011
Distribution: debian
Posts: 107
Original Poster
Rep: 
|
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? ?
|
|
|
|
12-04-2011, 04:38 PM
|
#11
|
|
Member
Registered: Oct 2011
Distribution: debian
Posts: 107
Original Poster
Rep: 
|
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'.
|
|
|
|
12-04-2011, 05:24 PM
|
#12
|
|
Member
Registered: Dec 2004
Location: Caracas, Venezuela
Distribution: Debian Sid, LMDE
Posts: 825
Rep: 
|
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?)
Regards.
|
|
|
1 members found this post helpful.
|
12-04-2011, 05:31 PM
|
#13
|
|
Senior Member
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing
Posts: 1,673
|
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?)
Regards.
|
+112
|
|
|
|
12-04-2011, 05:58 PM
|
#14
|
|
Member
Registered: Oct 2011
Distribution: debian
Posts: 107
Original Poster
Rep: 
|
i've attached it since it doesn't format properly with notepad;
|
|
|
|
12-04-2011, 06:46 PM
|
#15
|
|
Senior Member
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing
Posts: 1,673
|
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.
I will study more on your results.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 11:37 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|