LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 12-31-2008, 02:04 AM   #1
demonbladenet
Member
 
Registered: Dec 2008
Posts: 38

Rep: Reputation: 15
Question Need help with getting My GRUB back


I have Windows XP on my systems internal Hard drives...so i tried to install Ubuntu 8.10 on to an external hard drive that is 500gigs. somewhere in the installation process my system could not boot from my windows or Ubuntu installations. I finally got..using an app from a disc called Super Grub,my Windows back up.
The problem is that Windows doesn't "see" the external drive and the external drive does not boot up ,even when it is the first device.The Bios "sees" the external clearly but that helps only in knowing it's there. How do i get the Linux fixed on the external?
 
Old 12-31-2008, 08:52 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
welcome to LQ!!

The default in this situation would be for the Ubuntu installer to put GRUB in the mbr of the internal drive (#1 as reported by the BIOS). If you followed the default installation, everything **should have** been setup automatically.

Did the the SuperGrub disk restore the Windows bootloader, or do you still have to to use the CD to boot Windows?

Can you boot into Ubuntu using the SuperGrub CD?

Assuming that you can somehow get into the Ubuntu installation, you can install GRUB to the MBR of the external drive, and then switch the boot order in the BIOS. Or you can try again with GRUB on the internal drive.
 
Old 12-31-2008, 08:00 PM   #3
demonbladenet
Member
 
Registered: Dec 2008
Posts: 38

Original Poster
Rep: Reputation: 15
see..that's the whole problem...getting to the Ubuntu installation. The XP installation is running from the HDD (internal) like it would as if Ubuntu was never installed .I need to get the Ubuntu on the external disk running
 
Old 12-31-2008, 09:30 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,838

Rep: Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822
SGD should be able to handle that - just ensure you update the MBR on the external disk.

Else, I would also have thought the Ubuntu install disk would give you the option to boot into an installed environment - maybe under rescue.
Then do "sudo fdisk -l" and see what your external is called - hopefully /dev/sdb. Then "sudo grub-install /dev/sdb" should do the trick. You'll maybe have to play with the (grub) boot menu to get at Windoze - maybe not.
 
Old 12-31-2008, 10:58 PM   #5
demonbladenet
Member
 
Registered: Dec 2008
Posts: 38

Original Poster
Rep: Reputation: 15
Exclamation I used the Ubuntu live disk

I used the Ubuntu live disk and the fdisk function and located the external in question. Then decided to use a back up utility to back up system and again saw the 500 gb external..and there is a 5+gig partition called Linux swap...what is this and should i just try to install from inside Ubuntu using a command line in the terminal or is there a way to access this 5gig partition and maybe fix the MBR for Ubuntu there? I really have appreciated the help
 
Old 01-01-2009, 10:48 AM   #6
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,870

Rep: Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249
It would probably simplify things is you posted the output of the fdisk -l command so you could get specific instructions on what to do. If you can't boot Ubuntu even when you have its disk set to first boot priority in the BIOS, you probably don't have the Grub stage1 file in that disks mbr.

Swap is equivalent to page file in windows, nothing on it, used if you run out of RAM.
 
Old 01-05-2009, 10:19 PM   #7
demonbladenet
Member
 
Registered: Dec 2008
Posts: 38

Original Poster
Rep: Reputation: 15
Exclamation This what f disk gave me

this what i got using fdisk

Disk /dev/sda: 203.9 GB, 203928109056 bytes
255 heads, 63 sectors/track, 24792 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x8f3b9d44

Device Boot Start End Blocks Id System
/dev/sda1 * 1 6374 51199123+ 7 HPFS/NTFS
/dev/sda2 6375 15298 71682030 7 HPFS/NTFS
/dev/sda3 15299 21672 51199155 7 HPFS/NTFS
/dev/sda4 21673 24792 25061400 7 HPFS/NTFS

Disk /dev/sdb: 300.0 GB, 300090728448 bytes
255 heads, 63 sectors/track, 36483 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x05035528

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 9561 76798701 7 HPFS/NTFS
/dev/sdb2 9562 19122 76798732+ 7 HPFS/NTFS
/dev/sdb3 19123 36483 139452232+ 7 HPFS/NTFS

Disk /dev/sdd: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x8d399bc0

Device Boot Start End Blocks Id System
/dev/sdd1 1 60051 482359626 83 Linuxit looks to me ta
/dev/sdd2 60052 60801 6024375 5 Extended
/dev/sdd5 60052 60801 6024343+ 82 Linux swap / Solaris

Disk /dev/sde: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xa4b57300

Device Boot Start End Blocks Id System
/dev/sde1 * 1 31676 254437438+ 7 HPFS/NTFS
/dev/sde2 31677 38913 58131202+ 5 Extended
/dev/sde5 31677 38913 58131171 bc Unknown
ubuntu@ubuntu:~$

It looks to me that sdd is the 500 gig external I've been discussing. Should I use the following command

sudo install /dev/sdd ?


Again I relly appreciate all the help this forum has given this Linux green noob
 
Old 01-06-2009, 02:01 PM   #8
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,870

Rep: Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249
sdd1 is the only Linux partition, so that should be Ubuntu. sda5 is the swap. To verify that Grub sees it that way, use your Ubuntu CD and let it load, open a terminal window and enter command:

sudo grub (you should be prompted for password, hit enter and get grub prompt= grub>)

at the grub prompt, type: find /boot/vmlinuz (hit enter)
then type: find /boot/grub/stage1

Your output should be (hd3,0)

If it is then you can isntall grub, at the grub prompt type:


root (hd3,1)
setup (hd3)
quit

This would install Grub to the mbr of the sdd drive and to boot Ubuntu, you will need to set that drive as first boot priority in the BIOS.
 
Old 01-06-2009, 10:26 PM   #9
demonbladenet
Member
 
Registered: Dec 2008
Posts: 38

Original Poster
Rep: Reputation: 15
this did not work for me
I enetered sudo grub and got to the grub prompt

then I entered the line...find /boot/vmlinuz and got an error message

next i tried find /boot/vmlinux and got a directory not found message

so i figure to give the command find /boot/grub/stage1 a try

my results were (hd2,0)

Last edited by demonbladenet; 01-06-2009 at 10:27 PM. Reason: wrong spacings
 
Old 01-06-2009, 10:28 PM   #10
demonbladenet
Member
 
Registered: Dec 2008
Posts: 38

Original Poster
Rep: Reputation: 15
used the proper spacings after find
 
Old 01-06-2009, 10:33 PM   #11
demonbladenet
Member
 
Registered: Dec 2008
Posts: 38

Original Poster
Rep: Reputation: 15
this is what it looked like on the Ubunto terminal


ubuntu@ubuntu:~$ sudo grub
Probing devices to guess BIOS drives. This may take a long time.

[ Minimal BASH-like line editing is supported. For
the first word, TAB lists possible command
completions. Anywhere else TAB lists the possible
completions of a device/filename. ]
grub> find boot/vmlinux
find boot/vmlinux

Error 15: File not found
grub> find /boot/grub stage 1
find /boot/grub stage 1

Error 15: File not found
grub> find /boot/vmlinuz
find /boot/vmlinuz

Error 15: File not found
grub> find /boot/grub/stage1
find /boot/grub/stage1
(hd2,0)
grub>
 
Old 01-06-2009, 11:51 PM   #12
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,870

Rep: Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249
The find /boot/vmlinuz file command is linuz w/a letter "Z" not an "X".

Go to the grub prompt again and type: find /boot/grub/stage2, then try "find /vmlinuz", if you get no results you likely don't have the kernel installed? which is what the "vmlinuz" file is.

If you get no results from this do the following commands using sudo:

mkdir /mnt/ubuntu
mount -t /dev/sdd1 /mnt/ubuntu
ls -l /mnt/ubuntu

Look for vmlinuz and initrd files in this list. Post output.
 
Old 01-07-2009, 05:18 PM   #13
demonbladenet
Member
 
Registered: Dec 2008
Posts: 38

Original Poster
Rep: Reputation: 15
this what I got

ubuntu@ubuntu:~$ sudo grub
Probing devices to guess BIOS drives. This may take a long time.

[ Minimal BASH-like line editing is supported. For
the first word, TAB lists possible command
completions. Anywhere else TAB lists the possible
completions of a device/filename. ]
grub> find /boot/grub/stage2
find /boot/grub/stage2
(hd2,0)
grub> find /vmlinuz
find /vmlinuz
(hd2,0)


ubuntu@ubuntu:~$ sudo mkdir /mnt/ubuntu
ubuntu@ubuntu:~$ mount -t dev/sdd1 /mnt/ubuntu
mount: only root can do that
ubuntu@ubuntu:~$ mount -t /dev/sdd1 /mnt/ubuntu
mount: only root can do that
ubuntu@ubuntu:~$ ls -l /mnt/ubuntu
total 0
ubuntu@ubuntu:~$
 
Old 01-07-2009, 06:28 PM   #14
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,870

Rep: Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249
From the output of your last post, your vmlinuz file is in the root directory of (hd2,0) and the stage1 and stage2 files are in its /boot/grub directory. You were doing alright until you got to the line below:

Quote:
ubuntu@ubuntu:~$ mount -t dev/sdd1 /mnt/ubuntu
You did the mkdir command as root using sudo, you need to do the other commands as root also, using sudo. Do them as indicated below:

Quote:
ubuntu@ubuntu:~$ sudo mount -t dev/sdd1 /mnt/ubuntu
ubuntu@ubuntu:~$ ls /mnt/ubuntu
You don't need to use sudo for the "ls -l" command. If you have re-booted since you did the mkdir command you will likely need to do it again and then run the commands above. After running ls -l, you should see an output of the directories in the root directory:

If you do see them, you should take a look at the Ubuntu menu.lst file. Change directories (need to use sudo again):

sudo cat /mnt/ubuntu/menu.lst

Post the output of that file. Also, I'm not sure what you want to do. Only boot Ubuntu off the external and keeping the xp bootloader on the internal? boot both with Grub?
 
Old 01-08-2009, 03:13 AM   #15
demonbladenet
Member
 
Registered: Dec 2008
Posts: 38

Original Poster
Rep: Reputation: 15
this is a output of both the grub commands and the mkdir commands with the corrections you indicated ...as for how I want the Ubuntu to boot...I would like to have this as a dual boot system but I feel that it is more practical to run the Ubuntu external drive separate and to control booting by a bios option app that is included in my BIOS.all I need is to press F11 and I can choose my boot options.So lets keep as a boot at users discretion style of system and not a dual boot.That way Windows and Ubuntu don't have to play nice


ubuntu@ubuntu:~$ grub
Probing devices to guess BIOS drives. This may take a long time.

[ Minimal BASH-like line editing is supported. For
the first word, TAB lists possible command
completions. Anywhere else TAB lists the possible
completions of a device/filename. ]
grub> find /boot/grub/stage2
find /boot/grub/stage2

Error 15: File not found
grub> find /boot/grub/stage2
find /boot/grub/stage2

Error 15: File not found
grub> find /vmlinuz
find /vmlinuz

Error 15: File not found
grub>



ubuntu@ubuntu:~$ sudo mkdir /mnt/ubuntu
mkdir: cannot create directory `/mnt/ubuntu': File exists
ubuntu@ubuntu:~$ sudo mount -t /dev/sdd1 /mnt/ubuntu
Usage: mount -V : print version
mount -h : print this help
mount : list mounted filesystems
mount -l : idem, including volume labels
So far the informational part. Next the mounting.
The command is `mount [-t fstype] something somewhere'.
Details found in /etc/fstab may be omitted.
mount -a [-t|-O] ... : mount all stuff from /etc/fstab
mount device : mount device at the known place
mount directory : mount known device here
mount -t type dev dir : ordinary mount command
Note that one does not really mount a device, one mounts
a filesystem (of the given type) found on the device.
One can also mount an already visible directory tree elsewhere:
mount --bind olddir newdir
or move a subtree:
mount --move olddir newdir
One can change the type of mount containing the directory dir:
mount --make-shared dir
mount --make-slave dir
mount --make-private dir
mount --make-unbindable dir
One can change the type of all the mounts in a mount subtree
containing the directory dir:
mount --make-rshared dir
mount --make-rslave dir
mount --make-rprivate dir
mount --make-runbindable dir
A device can be given by name, say /dev/hda1 or /dev/cdrom,
or by label, using -L label or by uuid, using -U uuid .
Other options: [-nfFrsvw] [-o options] [-p passwdfd].
For many more details, say man 8 mount .
ubuntu@ubuntu:~$
ubuntu@ubuntu:~$ ls -l /mnt/ubuntu
total 0
ubuntu@ubuntu:~$ ls/mnt/ubuntu
bash: ls/mnt/ubuntu: No such file or directory
ubuntu@ubuntu:~$




Not sure what to do with the command:

sudo cat /mnt/ubnuntu/menu.lst
 
  


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
Grub is gone, how to get it back? infornography Linux - General 8 03-08-2005 02:24 AM
I want GRUB Back! 1veedo Linux - Software 4 02-02-2005 07:32 PM
how to get grub back vijaysh Linux - General 4 12-07-2004 11:55 PM
getting grub back viniosity Linux - Newbie 3 11-30-2004 10:40 AM
help in getting grub back varunk123456 Red Hat 2 05-03-2004 01:08 PM


All times are GMT -5. The time now is 07:10 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration