LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 12-08-2011, 01:43 PM   #31
62chevy
Member
 
Registered: Mar 2002
Location: West (By God) Virginia
Distribution: Debian Squeeze - Sid
Posts: 281

Rep: Reputation: 44

Quote:
Originally Posted by sdfi View Post
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
 
Old 12-09-2011, 11:41 AM   #32
sdfi
Member
 
Registered: Oct 2011
Distribution: debian
Posts: 107

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by widget View Post
I don't know how you removed it.
Yes, i deleted the lines. It was stupid, i know. What i am trying to get at is exactly what do i need to enter back in.

62chevy - It is squeeze CD 1. This.
 
Old 12-09-2011, 02:23 PM   #33
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,214

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
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;
Code:
grub-install /dev/sda
Should do the trick.
 
Old 12-09-2011, 02:35 PM   #34
62chevy
Member
 
Registered: Mar 2002
Location: West (By God) Virginia
Distribution: Debian Squeeze - Sid
Posts: 281

Rep: Reputation: 44
This a screenshot of the .iso you used.
Attached Images
File Type: jpg Screenshot at 2011-12-09 15:25:40.jpg (80.5 KB, 10 views)
 
Old 12-09-2011, 05:53 PM   #35
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,214

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
You should not send such good screen shots. I tried to click on the menu window to close it.
 
Old 12-10-2011, 10:50 AM   #36
sdfi
Member
 
Registered: Oct 2011
Distribution: debian
Posts: 107

Original Poster
Rep: Reputation: Disabled
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.
 
Old 12-10-2011, 12:01 PM   #37
62chevy
Member
 
Registered: Mar 2002
Location: West (By God) Virginia
Distribution: Debian Squeeze - Sid
Posts: 281

Rep: Reputation: 44
Quote:
Originally Posted by sdfi View Post
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.
 
Old 12-10-2011, 03:38 PM   #38
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,214

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
Quote:
Originally Posted by 62chevy View Post
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.
Yes. Do that.
 
Old 12-10-2011, 03:42 PM   #39
sdfi
Member
 
Registered: Oct 2011
Distribution: debian
Posts: 107

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by fdisk -l
/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

Last edited by sdfi; 12-10-2011 at 03:46 PM.
 
Old 12-10-2011, 04:42 PM   #40
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,214

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
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.
 
Old 12-10-2011, 05:16 PM   #41
sdfi
Member
 
Registered: Oct 2011
Distribution: debian
Posts: 107

Original Poster
Rep: Reputation: Disabled
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'.
 
Old 12-10-2011, 06:15 PM   #42
62chevy
Member
 
Registered: Mar 2002
Location: West (By God) Virginia
Distribution: Debian Squeeze - Sid
Posts: 281

Rep: Reputation: 44
Go back to ' Rescue Mode ' like you did when you used the command ' fdisk -l '.

This time I want you to mount /dev/sda5 like this.

Code:
mount -t auto /dev/sda5 /mnt
Then 'cd /mnt ' and do an ' ls '.

If mount gives you an error tell us what the error is, write it down verbatim, it's important to what what error is given and why.

If no error then have a look around and see if everything is installed. Check /etc, /boot, /lib, bin, /sbin and /usr.

Some directories will be empty. If you want mount /dev/sda1 to /media and compare the two but should not be exactly the just similar.

The last thing I would like for you to do is ' df -h '. This will give the size of the partition and amount used and unused.

Code:
chevy@debian:~$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1             114G   38G   71G  35% /
tmpfs                 7.9G     0  7.9G   0% /lib/init/rw
udev                  7.9G  220K  7.9G   1% /dev
tmpfs                 7.9G     0  7.9G   0% /dev/shm
/dev/sdb1             294G  170G  109G  61% /home/chevy/Storage
chevy@debian:~$
Attached Images
File Type: png Screenshot-2.png (118.2 KB, 2 views)
 
Old 12-10-2011, 06:36 PM   #43
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,214

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
Yes you need to be in sda5 to do anything to sda5. Glad that dpkg finally got those packages installed.

Grub has no reason to be installed on sda5 in this context. The only place for it is /sda. That puts it on the MBR.
 
Old 12-11-2011, 08:29 AM   #44
sdfi
Member
 
Registered: Oct 2011
Distribution: debian
Posts: 107

Original Poster
Rep: Reputation: Disabled
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.

Again, why won't voyage or even grub itself boot?
 
Old 12-11-2011, 12:19 PM   #45
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,214

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
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.
 
  


Reply

Tags
grub, install, mbr


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] cannot install grub (grub-probe says 'unknown fs' with ext4 and md raid) cusco Linux - Software 3 03-15-2011 01:58 AM
Grub - Does fedora automatically install a bootloader like grub? or... mitchell7man Linux - Software 10 05-09-2007 10:49 AM
Booting my new ubuntu install = "GRUB GRUB GRUB GRUB GRUB" etc. dissolved soul Ubuntu 2 01-13-2007 12:55 PM
Need to (re)install GRUB: fedora c4 rescue cd (and GRUB) unable to see the harddisk whencat Fedora 4 03-05-2006 02:01 PM
Grub 0.97 issues on slackware - grub-install is very slow, & updating menu.lst fails dieyouspammer Linux - Software 1 02-27-2006 01:06 PM


All times are GMT -5. The time now is 03:18 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration