LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 06-20-2009, 07:48 AM   #16
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 963

Original Poster
Rep: Reputation: 32

irishbitte

I cant seem to get any thing to work here, fresh installs etc etc

even tried a view different ways

hd1,0 gives off Error 13 message

hd1,1 says: Starting up...

hd0,1 gives off Error 22: No such partition

hd0,0 says: Starting up...

fdisk -l

Quote:
Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0008195a

Device Boot Start End Blocks Id System
/dev/sda1 * 1 29698 238549153+ 83 Linux
/dev/sda2 29699 30401 5646847+ 5 Extended
/dev/sda5 29699 30401 5646816 82 Linux swap / Solaris

Disk /dev/sdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x2052474d

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 30400
Code:
# menu.lst - See: grub(8), info grub, update-grub(8)
#            grub-install(8), grub-floppy(8),
#            grub-md5-crypt, /usr/share/doc/grub
#            and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default		0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout		10

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu

# Pretty colours
#color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line)  and entries protected by the
# command 'lock'
# e.g. password topsecret
#      password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title		Windows 95/98/NT/2000
# root		(hd0,0)
# makeactive
# chainloader	+1
#
# title		Linux
# root		(hd0,1)
# kernel	/vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
##      kopt_2_6_8=root=/dev/hdc1 ro
##      kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=378b7e26-7532-4981-a334-ee32686e28d1 ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=378b7e26-7532-4981-a334-ee32686e28d1

## should update-grub create alternative automagic boot options
## e.g. alternative=true
##      alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
##      lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash

## should update-grub lock old automagic boot options
## e.g. lockold=false
##      lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
##      altoptions=(recovery) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
##      howmany=7
# howmany=all

## specify if running in Xen domU or have grub detect automatically
## update-grub will ignore non-xen kernels when running in domU and vice versa
## e.g. indomU=detect
##      indomU=true
##      indomU=false
# indomU=detect

## should update-grub create memtest86 boot option
## e.g. memtest86=true
##      memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

title		Ubuntu 9.04, kernel 2.6.28-13-generic
uuid		378b7e26-7532-4981-a334-ee32686e28d1
kernel		/boot/vmlinuz-2.6.28-13-generic root=UUID=378b7e26-7532-4981-a334-ee32686e28d1 ro quiet splash 
initrd		/boot/initrd.img-2.6.28-13-generic
quiet

title		Ubuntu 9.04, kernel 2.6.28-13-generic (recovery mode)
uuid		378b7e26-7532-4981-a334-ee32686e28d1
kernel		/boot/vmlinuz-2.6.28-13-generic root=UUID=378b7e26-7532-4981-a334-ee32686e28d1 ro  single
initrd		/boot/initrd.img-2.6.28-13-generic

title		Ubuntu 9.04, kernel 2.6.28-11-generic
uuid		378b7e26-7532-4981-a334-ee32686e28d1
kernel		/boot/vmlinuz-2.6.28-11-generic root=UUID=378b7e26-7532-4981-a334-ee32686e28d1 ro quiet splash 
initrd		/boot/initrd.img-2.6.28-11-generic
quiet

title		Ubuntu 9.04, kernel 2.6.28-11-generic (recovery mode)
uuid		378b7e26-7532-4981-a334-ee32686e28d1
kernel		/boot/vmlinuz-2.6.28-11-generic root=UUID=378b7e26-7532-4981-a334-ee32686e28d1 ro  single
initrd		/boot/initrd.img-2.6.28-11-generic

title		Ubuntu 9.04, memtest86+
uuid		378b7e26-7532-4981-a334-ee32686e28d1
kernel		/boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title		Other operating systems:
root


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sdb1
title		Microsoft Windows XP Professional
root	        (hd1,0)
savedefault
map		(hd0) (hd1)
map		(hd1) (hd0)
chainloader	+1
TT
 
Old 06-20-2009, 10:49 AM   #17
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,502

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
I'd suggest you change your xp entry to "rootnoverify (hd1,0), leave the rest. This is what you originally had and didn't work so...?? You might try running the geometry commands from a grub prompt, log in as root (sudo grub) and run "geometry (hd0), geometry (hd1) and compare the results with the fdisk output.
 
Old 06-20-2009, 03:49 PM   #18
irishbitte
Senior Member
 
Registered: Oct 2007
Location: Brighton, UK
Distribution: Ubuntu Hardy, Ubuntu Jaunty, Eeebuntu, Debian, SME-Server
Posts: 1,213
Blog Entries: 1

Rep: Reputation: 88
ok, what you need to do now is boot into ubuntu and do the following:
1. Boot with any live CD (I've done it with Ubuntu Live DVD)
2. Get a root shell -> Applications / System Tools / Root Terminal
3: Do the following commands:
Code:
update-grub
mkdir /mnt/ubuntu
fdisk -l ##(check your ubuntu install)
mount -t ext3 /dev/sda1 /mnt/ubuntu ##(replace /dev/sda1 by your Ubuntu partition)
chroot /mnt/ubuntu ##(change root to correct area)
grub-install /dev/sda ##(restore grub)
4: Reboot the machine.

You should be back up and running!

Last edited by irishbitte; 06-20-2009 at 03:53 PM.
 
Old 06-20-2009, 03:52 PM   #19
irishbitte
Senior Member
 
Registered: Oct 2007
Location: Brighton, UK
Distribution: Ubuntu Hardy, Ubuntu Jaunty, Eeebuntu, Debian, SME-Server
Posts: 1,213
Blog Entries: 1

Rep: Reputation: 88
Sorry tommytomato, I just noticed this in your last fdisk -l:
Quote:
Disk /dev/sdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x2052474d
I hope you have windows backed up?
 
Old 06-20-2009, 07:18 PM   #20
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 963

Original Poster
Rep: Reputation: 32
I'm on the live CD,

ubuntu@ubuntu isnt that the CD root ?

Do i need to access the system root ? if so how do I access it via live cd, got me foxed

update-grub from command line ubuntu@ubuntu

Quote:
ubuntu@ubuntu:~$ sudo update-grub
Searching for GRUB installation directory ...
No GRUB directory found. To create a template run 'mkdir /boot/grub' first.
To install grub, install it manually or try the 'grub-install' command.
### Warning, grub-install is used to change your MBR.
to me thats only accessing the root CD, is that correct ?

TT
 
Old 06-20-2009, 07:25 PM   #21
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 963

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by yancek View Post
I'd suggest you change your xp entry to "rootnoverify (hd1,0), leave the rest. This is what you originally had and didn't work so...?? You might try running the geometry commands from a grub prompt, log in as root (sudo grub) and run "geometry (hd0), geometry (hd1) and compare the results with the fdisk output.
I changed it back to what it was rootnoverify (hd1,0),

here are those geometry outputs

Code:
grub> geometry (hd0)                
drive 0x80: C/H/S = 30401/255/63, The number of sectors = 488397168, /dev/sda
   Partition num: 0,  Filesystem type is ext2fs, partition type 0x83
   Partition num: 4,  Filesystem type unknown, partition type 0x82
Code:
grub> geometry (hd1)
drive 0x81: C/H/S = 30401/255/63, The number of sectors = 488397168, /dev/sdb
   Partition num: 0,  Filesystem type unknown, partition type 0x7
TT

Last edited by tommytomato; 06-20-2009 at 07:26 PM. Reason: spelling
 
Old 06-20-2009, 08:22 PM   #22
irishbitte
Senior Member
 
Registered: Oct 2007
Location: Brighton, UK
Distribution: Ubuntu Hardy, Ubuntu Jaunty, Eeebuntu, Debian, SME-Server
Posts: 1,213
Blog Entries: 1

Rep: Reputation: 88
tommy, on the live cd, open a regular terminal: Applications->Accessories->Terminal. Use the command
Code:
sudo -s
to get a root terminal. This from your geometry checks:
Quote:
grub> geometry (hd1)
drive 0x81: C/H/S = 30401/255/63, The number of sectors = 488397168, /dev/sdb
Partition num: 0, Filesystem type unknown, partition type 0x7
does not look good, it looks like your windows installation is gone. This is now officially beyond my experience level. So far as I know, it is possible to get it back, but I really would not know how to go about that. Generally, I would reinstall at this point, and restore personal files from backups.
 
Old 06-20-2009, 09:26 PM   #23
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 963

Original Poster
Rep: Reputation: 32
Backing up files now as we speak

What do you reckon, I have two hard drives on this system

install

XP Pro first on first HD

then

Ubuntu on 2nd HD

will try what you said thou, I know the windows is there becuase I can access within Ubuntu it self

I did have all this working before with 8.04 but the 9.04 came out so I fdisk the HD and reinstalled the 9.04 version, then I notice I had the problem with grub because I fitted a TV capture card to one of my PCI slots, so I wanted to test to see it works on XP first before I tried with Ubuntu, booted up again and I notice grub was playing up..

thats it in a nut shell..


TT

Last edited by tommytomato; 06-20-2009 at 09:36 PM.
 
Old 06-20-2009, 10:04 PM   #24
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 963

Original Poster
Rep: Reputation: 32
No go again

keeps saying grub is not there

O well, time to redo this system

Will install XP on first HD, then Ubuntu on 2nd HD

off to get me some fish first, tank needs a few more friends, LOL

TT
 
Old 06-21-2009, 09:47 AM   #25
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 963

Original Poster
Rep: Reputation: 32
No luck this time round either

XP is on first boot, ubuntu on 2nd HD, grub doesn't show up at all now

Dont spose any one know's of a free boot manger, so i can get a quick fix to my problem, I cant seem to get grub going

its funny I've had duel boots before but this time round its a no go

has the vesion 9.04 got a bug, seem to be alot of people having the same trouble as me..

TT
 
Old 06-21-2009, 12:56 PM   #26
irishbitte
Senior Member
 
Registered: Oct 2007
Location: Brighton, UK
Distribution: Ubuntu Hardy, Ubuntu Jaunty, Eeebuntu, Debian, SME-Server
Posts: 1,213
Blog Entries: 1

Rep: Reputation: 88
My way around this is put both XP and ubuntu on one HDD, then use the second HDD as /home or some such in ubuntu. Your problem is that the windows bootloader is taking over the MBR of /dev/sda, and grub is installed in the MBR of /dev/sdb, but when booting, the BIOS is only looking at /dev/sda since it is the first HDD. Bit of a pain. I was trying to fix this for you in one of my previous posts. Anyway, if you are reinstalling again, make a small (~8-9GB) partition on your 'windows' disk, having already installed windows, and install ubuntu there. Thats my best suggestion. It takes the complications out of it.
 
  


Reply

Tags
error, fdisk, geometry, grub, sudo, ubuntu, xp



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
install kubuntu 8.10 with lilo rather than grub (because of grub error 18) dukeinlondon Ubuntu 7 12-27-2008 06:53 PM
Loading Grub 1.5 Please Wait...... Grub Failed Error 18 2words4uready Linux - Newbie 5 06-12-2008 05:37 PM
Grub error 17, and wont reinstall using grub-install! chiefreborn Linux - General 6 06-06-2007 10:29 AM
Grub Error 17: Cannot mount selected partition and other Grub problems Sebastian Naitsabes Linux - General 1 07-05-2005 08:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 11:28 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration