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.
There is no 'Reinstall the Grub Boot Loader' option under Advance options>Rescue mode on the install CD. The options are 'execute a shell in [root fs location]' 'execute a shell in installer location', change root fs, and reboot.
widget; like i said, i removed the CD from sources.list. (It has the normal online sources, and they 'hit' fine when running apt-get update.) How do i put the install CD back in sources.list?
What CD are you using because the the only one I get those in is Lenny's installer every Squeeze install gave me the option to reinstall grub.
Hmmm the live CD? Didn't try that , let me test.
EDIT: Just checked the Squeeze live DVD and it lets you reinstall Grub too.
Last edited by 62chevy; 12-08-2011 at 01:55 PM.
Reason: Added info
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628
Rep:
Use the rescue option to drop into a shell and use the command in my script, one at a time, starting with the "mkdir" line.
When you do the last line, starts with "chroot", do;
Code:
apt-get update
then the grub removal stuff and then;
[code]
apt-get install grub-pc grub-common
[code]
then, to be sure it will boot to your install;
Code:
grub-mkconfig
this will print out the /boot/grub/grub.cfg file to your terminal. Check it to see if the entry for your Debian install is there.
If so boot to it and we will get the others to boot from there (easier from there).
If it is not there then do;
Code:
update-grub
and run the mkconfig command again to check.
You should watch when grub is installed to make sure it is also installed on the MBR. You should see a line saying the install is finished with no errors (can't remember the exact wording).
If you are worried that it is not installed or not sure, run;
Right. Done everything as suggested by widget. I got apt-get install grub-pc grub-common to work.. [i think there was a problem with my sources.list but fixed now.] Although it reported the error
Code:
error processing grub-pc (--configure):
subprocess installed post-installation script returned error exit status 255
I could only see that grub found installations on /dev/sda1 (voyage) and not /dev/sda5 (debian). I ran all your suggestions in the last post and it hasn't changed my boot situation.
Note; 'cp /etc/resolv.conf /mnt/debian-root/etc/resolve.conf' - both should be resolv.conf AFAICT.
62chevy; i only get that if i select /dev/sda1 as my root filesystem. If i pick /dev/sda5 i do not get a grub option.
Right. Done everything as suggested by widget. I got apt-get install grub-pc grub-common to work.. [i think there was a problem with my sources.list but fixed now.] Although it reported the error
Code:
error processing grub-pc (--configure):
subprocess installed post-installation script returned error exit status 255
I could only see that grub found installations on /dev/sda1 (voyage) and not /dev/sda5 (debian). I ran all your suggestions in the last post and it hasn't changed my boot situation.
Note; 'cp /etc/resolv.conf /mnt/debian-root/etc/resolve.conf' - both should be resolv.conf AFAICT.
62chevy; i only get that if i select /dev/sda1 as my root filesystem. If i pick /dev/sda5 i do not get a grub option.
That doesn't sound right something had to go wrong. Run the Debian CD again in Rescue Mode but this time do not choose a partition to work from instead choose ' Do not use a root file system ' then ' Execute a shell in the installer environment ' then ' continue ' when you get a command prompt use ' fdisk -l ' to see what partitions show up. It's possible you are mistaken on the partition number or something went wrong when you created the partition. If /dev/sda5 is there then run ' e2fsck /dev/sda5 '. Let us know how that works out for you.
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628
Rep:
Quote:
Originally Posted by 62chevy
That doesn't sound right something had to go wrong. Run the Debian CD again in Rescue Mode but this time do not choose a partition to work from instead choose ' Do not use a root file system ' then ' Execute a shell in the installer environment ' then ' continue ' when you get a command prompt use ' fdisk -l ' to see what partitions show up. It's possible you are mistaken on the partition number or something went wrong when you created the partition. If /dev/sda5 is there then run ' e2fsck /dev/sda5 '. Let us know how that works out for you.
/dev/sda1 Linux
/dev/sda2 Extended
/dev/sda5 * Linux
/dev/sda6 Linux Swap
sda5 is labelled as boot. I don't know why there is no sda3/4? or what sda2 is about.
Quote:
Originally Posted by fsck /dev/sda5
../dev/sda5 was not cleanly unmounted... [checking..] ..optimizing directories.. [more checking...]
*****FILE SYSTEM WAS MODIFIED*****
xyz/123 files, abc/def blocks
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628
Rep:
First. Sda1 is a primary partition. You are limited to only 4 primaries. Sda2 is an extended partition. This is a type of primary partition that you can put a number of other "logical" partitions inside of.
Sda5 and sda6 are logical partition within sda2. Logical partition numbers always start with 5. You could have 4 primary partitions 1,2,3 and 4 with 4 being an extended partition. Thus 5 makes sense to start logical partition numbers with.
Try setting up grub again. Get in with the rescue disk and run, as root;
Code:
dpkg --configure grub-pc grub-common
then rerun;
Code:
update-grub
and
Code:
grub-mkconfig
check what it is picking up now.
This is interesting as other OS' are detected by /etc/grub.d/30_os-prober and the install on which grub is actually installed, Debian in this case, is detected by /etc/grub.d/10_linux. 2 different scripts for 2 different jobs.
I do not understand why one would be working and not the other. Of the two 10_linux is by far the most reliable.
Well thanks for clearing up about the partitions. I'm not sure what you are hoping here as it seems i've done all that before. It wasn't clear so I tried it first by chrooting into the debian install as there was no dpkg in installer environment;
Things 'dpkg --configure grub-pc grub-common' complains about; several complaints related to no default locale, 'unkown terminal: bterm Check the TERM environment variable'
dpkg: error processing grub-pc (--configure): subprocess installed post-installation script returned error exit status 255
dpkg:error processing grub-common (--configure): package grub-common is already installed and configured
update-grub only mentions /dev/sda1
then i used /dev/sda5 as root from the installer and 'dpkg --configure grub-pc grub-common' brought up a config window, i selected to install on /dev/sda. I passed over the option of installing it to /dev/sda5... following this, still only mentions of install in /dev/sda1. I tried running it again to also add grub to /dev/sda5 but it wouldn't let me saying it was already configured.
The thing that is really bugging me about this is that grub is supposedly finding the voyage install on /dev/sda1, and yet it is still not possible to boot into even this?? Nor do i get any grub screen, just 'Hard disk boot sector invalid'.
No error with mount -t auto /dev/sda5. /etc, /boot, /lib, bin, /sbin and /usr all present. df -h reports nothing that looks odd.. sda5 is using 664M of 27G.
@widget; i thought the same, just clutching at straws.
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628
Rep:
You are getting some sort of screen menu, this is a good sign.
Try to get the detailed partition info asked for in post 42.
Something else that we should have asked for long ago was for you to rerun the boot script again. Please do both of these things.
There is another thing I would like you to try that would be much easier from a Live CD for you to do. That is to add a couple entries to your /etc/grub.d/40_custom file. As both of the installs are Debian based they should work. I would not do this until you have gotten the above requested info as doing so will change some things that we need to know about the current conditions.
These are the menu entries;
Code:
echo "Adding Debian on sda5" >&2
cat << EOF
menuentry "Debian on sda5" {
set root=(hd0,5)
linux /vmlinuz root=/dev/sda5 ro quiet
initrd /initrd.img
}
EOF
echo "Adding Voyage on sda1" >&2
cat << EOF
menuentry "Voyage on sda1" {
set root=(hd0,1)
linux /vmlinuz root=/dev/sda1 ro quiet
initrd /initrd.img
}
EOF
After getting the partition and boot info and posting it, go to a Live Session if you can and just copy/paste these into the /etc/grub.d/40_custom file. You will have to do this as root.
After doing this you will probably find it easiest to go back to the Debian install disk to chroot back to sda5 and run;
Code:
update-grub
and then to see if they will show up;
Code:
grub-mkconfig
If they show up they you should reboot and see if they work. They should be below the entry that you currently see on your menu screen.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.