UbuntuThis forum is for the discussion of Ubuntu 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.
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 963
Original Poster
Rep:
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
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.
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.
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 963
Original Poster
Rep:
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 ?
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 963
Original Poster
Rep:
Quote:
Originally Posted by yancek
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
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.
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 963
Original Poster
Rep:
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.