LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 04-02-2009, 08:06 AM   #1
tigertim71
Member
 
Registered: Oct 2008
Location: London, England
Distribution: Puppy
Posts: 93

Rep: Reputation: 15
grub - problems!


Most of my problems seem to stem from grub, or my lack of knowledge of it.

Yesterday, I had problems installing a d/boot puppy/W98SE. The cdrom would not open and I restarted but it went to W98SE only.

I then deleted partitions, fdisk /mbr etc. and installed Knoppix 6.

This hasn't entirely worked. W98SE isn't booting properly now, goes into safe mode or starts booting and then I get a black screen and shut down.

Am not sure where the MBR is placed, but Knoppix is fine and OK.

On Boot Windows I get this:

rootnoverify hd(0,0)
chainloader +1

On Knoppix 6:

root (hd 0,1)
kernel /boot/vmlinuz root = /dev/hda2 .....


So many grub problems - I don't understand the MBR and is grub installed in /boot of knoppix and where in W98SE. I thought it was located outside the operating systems. It's also difficult to know what these wizards are doing.

Has anyone been through the same thing...
 
Old 04-02-2009, 08:19 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
Quote:
Originally Posted by tigertim71 View Post
Has anyone been through the same thing...
Yes....

First, some basics:
  1. The MBR (Master Boot Record) is defined as the first sector of the physical drive. For that drive to be bootable, there must be boot code here.
  2. Instead of saying "outside the OS", I would say "outside the filesystems". The normal configuration of a drive has the first 63 sectors reserved for boot code and other stuff.
  3. Installation of Windows will take the MBR--no options. This is why the conventional wisdom is to always install Windows first.
  4. A "typical" dual-boot setup has grub code in the MBR, and the GRUB config file in the /boot/grub directory of the Linux install.

I am not totally clear on your current configuration. From Knoppix, please open a terminal, su to root, and enter "fdisk -l". Post the results here.

Also post the complete Windows entry in /boot/grub/menu.lst

See the "booting" link in my sig for some more stuff.....
 
Old 04-02-2009, 06:39 PM   #3
aus9
Guru
 
Registered: Oct 2003
Posts: 5,055

Rep: Reputation: Disabled
hi

LQ sometimes truncates extra space...but your menu entries appear to be wrong already.

eg hd(0,0) should be (hd0,0) if windows is on first partition

for the linux entry

root (hd 0,1) should be root (hd0,1)....and looks ok as I can see hda2 further in to your kernel line.
 
Old 04-02-2009, 07:17 PM   #4
tigertim71
Member
 
Registered: Oct 2008
Location: London, England
Distribution: Puppy
Posts: 93

Original Poster
Rep: Reputation: 15
grub - problems!

pixellany-

Many Thanks. Here's the information you requested from "fdisk -l":

Disk /dev/hda: 40.0 GB, 40060403712 bytes
255 heads, 63 sectors/track, 4870 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 1912 15358108+ c W95 FAT32 (LBA)
/dev/hda2 1913 2868 7679070 83 Linux
/dev/hda3 2869 3123 2048287+ 82 Linux swap / Solaris


Also from /boot/grub/menu.lst :

default 0
timeout 30
color cyan/blue white/blue

title KNOPPIX
root (hd0,1)
kernel /boot/vmlinuz root=/dev/hda2 lang=us apm=power-off vga=791 nomce loglevel=0 quiet rw

title Windows
rootnoverify (hd0,0)
chainloader +1

looking at your notes (thanks for the link), something looks wrong with my setup...

Just a note- I had to do a scan disk in W98SE before doing a defragment as there were disk errors, so I don't know if disk errors may also be causing this problem. A minor thing- the time settings also changed & I had to change them back to GMT/BST.

aus9 - as you can see I copied it out incorrectly the first time and it is correct as in this post.
 
Old 04-02-2009, 08:33 PM   #5
yancek
Senior Member
 
Registered: Apr 2008
Distribution: PCLinux, Ubuntu, Slackware
Posts: 4,477

Rep: Reputation: 696Reputation: 696Reputation: 696Reputation: 696Reputation: 696Reputation: 696
Quote:
aus9 - as you can see I copied it out incorrectly the first time and it is correct as in this post.
Actually, no. Here's your original post for w98:

Quote:
rootnoverify hd(0,0)
chainloader +1
The hd need to be in parenthesis also or it won't work like (hd0,0). Also, if there is no space after the rootnoverify, it won't work. Your entry for Knoppix from your earlier post has a similar error. This is what aus9 was trying to point out. This would prevent booting but maybe you just had a typing error in your earlier post??
 
Old 04-02-2009, 08:57 PM   #6
burninGpi
Member
 
Registered: Mar 2006
Location: Fort McMurray, Canada
Distribution: Gentoo ~amd64
Posts: 163

Rep: Reputation: 30
Try adding the makeactive command to your Windows boot entry:
Code:
title Windows
rootnoverify (hd0,0)
makeactive
chainloader +1
 
Old 04-04-2009, 02:53 AM   #7
tigertim71
Member
 
Registered: Oct 2008
Location: London, England
Distribution: Puppy
Posts: 93

Original Poster
Rep: Reputation: 15
I can physically edit, but can't save in the main GRUB screen, and have tried using 'gedit' and 'edit' commands which are not recognised.

I went straight to the menu.lst file in /boot/grub and tried there, but it did not allow me to save the changes.

I also tried using gedit /boot/grub/menu.lst in the root terminal, but that didn't work as well as trying in the normal terminal.

From what I can see Knoppix 6 is automatically root at startup. This is installed to my HDD.
 
Old 04-04-2009, 07:19 AM   #8
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
If you are referring to the GRUB screen at bootup, then you are right---there is no way to save changes there.

menu.lst does indeed have to be edited as root. You can open any installed editor from the terminal after switching to root using "su". Also, see if something like "nano" or "pico" is installed.

Quote:
I also tried using gedit /boot/grub/menu.lst in the root terminal, but that didn't work as well as trying in the normal terminal.
This should have worked---what was the problem
Quote:
From what I can see Knoppix 6 is automatically root at startup. This is installed to my HDD.
Sometimes, liveCD linux will come up as root but--if you installed it, then you should be asked for username and password when logging in.
 
Old 04-04-2009, 07:33 AM   #9
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
Try
Code:
sudo gedit /boot/grub/menu.lst
 
Old 04-04-2009, 05:52 PM   #10
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,225

Rep: Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021
Its often (usually ?) the case that /boot/grub/menu.lst is a symlink to /boot/grub/grub.conf. Open an xterm and try

ls -l /boot/grub

to check. You should the grub.conf file directly (all this as root user).
Check to see if permissions allow you to write to the file: mine looks like this:

-rw------- 1 root root 1486 Apr 4 07:52 /boot/grub/grub.conf

if yours looks like this, but you get an error in the editor like 'unable to write; insufficient permissions', it probably means the partition is mounted read-only, so you can use

mount -o remount,rw /

tou mount it read-writable and try again.
 
Old 04-05-2009, 03:27 PM   #11
tigertim71
Member
 
Registered: Oct 2008
Location: London, England
Distribution: Puppy
Posts: 93

Original Poster
Rep: Reputation: 15
grub - problems

chrism01 - I get this:

-rw-r--r-- 1 root root 197 Apr 5 20:18 default
-rw-r--r-- 1 root root 15 Apr 5 20:18 device.map
-rw-r--r-- 1 root root 8704 Apr 5 20:18 e2fs_stage1_5
-rw-r--r-- 1 root root 8544 Apr 5 20:18 fat_stage1_5
-rw-r--r-- 1 root root 9568 Apr 5 20:18 jfs_stage1_5
-rw-r--r-- 1 root root 169 Apr 5 20:18 menu.lst
-rw-r--r-- 1 root root 7904 Apr 5 20:18 minix_stage1_5
-rw-r--r-- 1 root root 10720 Apr 5 20:18 reiserfs_stage1_5
-rw-r--r-- 1 root root 512 Apr 5 20:18 stage1
-rw-r--r-- 1 root root 128552 Apr 5 20:18 stage2
-rw-r--r-- 1 root root 10280 Apr 5 20:18 xfs_stage1_5

I'm not sure if this is what you were expecting? (menu.lst is above). Have taken W98SE off so now it's single boot Knoppix 6. I'm not sure Windows OEM's are always happy having their partitions reduced. I had errors on 98SE (semi booted, safe mode etc). The XP on my other system goes into chkdsk on startup & this is complicated to stop.

Would like to find out if I can pw protect Knoppix like Ubuntu...

saikee - this worked in Ubuntu but not in Knoppix

pixellany - HDD full installs of Knoppix 6 & Puppy don't ask for usernames or passwords, unlike Ubuntu. I think DSL does though.

Basically everything works in Ubuntu - on the other distros it's more problematic.

On the positive side on my other laptop I installed in this order: XP, Puppy, Ubuntu and now have a triple boot which is a first.

For the future though I'm not sure how to find a kernel path, if say, I installed DSL to give it four boot? Do I also need to install GRUB bootloader again when it's offered on an installation wizard (ie. will it pick up on the other partitions?)
 
Old 04-05-2009, 05:04 PM   #12
yancek
Senior Member
 
Registered: Apr 2008
Distribution: PCLinux, Ubuntu, Slackware
Posts: 4,477

Rep: Reputation: 696Reputation: 696Reputation: 696Reputation: 696Reputation: 696Reputation: 696
Quote:
Do I also need to install GRUB bootloader again when it's offered on an installation wizard
No, you don't have to.

Quote:
will it pick up on the other partitions?
Maybe, maybe not. Some distributions are better than others at detecting other systems and putting entries in menu.lst for you.

You could decide before installing another DSL which distributions Grub bootloader you will use. If you choose not to use the bootloader of DSL, then you need an entry in the primary distributions menu.lst. The simplest way to get the correct entry for DSL is to mount it on main distro (Ubuntu?) and look at its menu.lst file for the entry (cat menu.lst) as root. Copy the DSL entry from menu.lst to Ubuntu menu.lst
 
Old 04-07-2009, 04:51 PM   #13
tigertim71
Member
 
Registered: Oct 2008
Location: London, England
Distribution: Puppy
Posts: 93

Original Poster
Rep: Reputation: 15
I'm not sure what you mean - surely it would now be better to create a new partition for DSL and then mount it on that partition and not the Ubuntu one.

Unless I have misunderstood something this is relatively straightforward, unlike the next stage which is to (try to) find the kernel path and then copy that into Ubuntu's "sudo gedit /boot/grub/menu.lst"
 
Old 04-07-2009, 06:58 PM   #14
yancek
Senior Member
 
Registered: Apr 2008
Distribution: PCLinux, Ubuntu, Slackware
Posts: 4,477

Rep: Reputation: 696Reputation: 696Reputation: 696Reputation: 696Reputation: 696Reputation: 696
You have W98 on hda1, Ubuntu on hda2, swap partition on hda3. You can create one more primary partition. If you use that to install DSL, you will not be able to create any more partitions so I would suggest you use that 4th primary partition to create an extended partition and create a logical partition within the extended to install DSL to.

If you install DSL, I believe it will give you the option whether to install Grub to the mbr or the root partition. I'm not sure as I have not installed it for awhile. If you choose to install Grub to the mbr during the DSL installation, it may or may not detect the other OS's. If it does not, you will need to make entries manually in its /boot/grub/menu.lst file.

If you choose not to install Grub to the mbr during the DSL install, you will then be able to continue to use the Ubuntu bootloader and will need to make an entry in the Ubuntu menu.lst file for DSL.

I'm basing this on the fdisk output from five days ago so I'm not sure whata you've done in the interim? I believe you have changed partitions and OS's since then, correct?

Quote:
I'm not sure what you mean - surely it would now be better to create a new partition for DSL and then mount it on that partition and not the Ubuntu one.
What I was referring to in the above quote was how to access DSL boot files since you were unable to boot DSL.

Since it's been several days since your posts, I'm really not sure what your partition setup currently is.
 
Old 04-08-2009, 04:59 PM   #15
tigertim71
Member
 
Registered: Oct 2008
Location: London, England
Distribution: Puppy
Posts: 93

Original Poster
Rep: Reputation: 15
grub partitions

These are my current partitions:

Device Boot Start End Blocks Id System
/dev/sda1 * 1 2550 20482843+ 7 HPFS/NTFS (XP)
/dev/sda2 2551 2681 1052257+ 82 Linux swap / Solaris
/dev/sda3 2682 2936 2048287+ 83 Linux (Puppy)
/dev/sda4 2937 4864 15486660 5 Extended
/dev/sda5 2937 4777 14787801 83 Linux (Ubuntu)
/dev/sda6 4778 4864 698796 82 Linux swap / Solaris

I only realised now that I had 2 swap partitions - is there any point in this? I could extend sda6 & get rid of sda2?

Then create additional space for DSL by reducing XP (I have not mounted DSL yet).
 
  


Reply


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
Gentoo... grub problems... "/boot/grub/stage1" exists... no halo14 Gentoo 5 02-06-2011 04:50 PM
Problems with /boot/grub/grub.conf not being read properly on reboots cmeyer Linux - Software 1 10-11-2008 06:34 PM
Problems with GRUB, not using whats in grub.conf **FIXED silentpetey Linux - General 1 11-06-2006 09:24 AM
Grub Error 17: Cannot mount selected partition and other Grub problems Sebastian Naitsabes Linux - General 1 07-05-2005 08:33 AM
Grub problems mpelts Slackware 1 07-09-2003 01:05 PM


All times are GMT -5. The time now is 06:04 AM.

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