LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 01-08-2009, 10:48 AM   #16
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,869

Rep: Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247

First off, my mistake in posts 12 and 14, forgot to put filesystem type in the command so change to:

Quote:
ubuntu@ubuntu:~$ mount -t ext3 /dev/sdd1 /mnt/ubuntu
In your post 11 you did the grub find command and got (hd2,0) as a result for stage1 file.

In your post 13, you did the grub find command for vmlinuz and stage2 with the same result (hd2,0).

In your last post, the same find commands show no results so I'm not sure what's going on there unless the drive is not attached or the files were somehow deleted?

After running the mount command above, try:

ls /mnt/ubuntu/ (see if the vmlinuz file is listed)
ls /mnt/ubuntu/boot/grub/ (see if the stage1, stage2 files are there)

The command below will display the menu.lst file contents. Post here.
Quote:
sudo cat /mnt/ubnuntu/menu.lst
 
Old 01-08-2009, 04:50 PM   #17
demonbladenet
Member
 
Registered: Dec 2008
Posts: 38

Original Poster
Rep: Reputation: 15
I seem to continue getting a file not found or directory not found after entering those commands.I was wondering ...I've been bouncing between the Ubuntu Live Cd and Windows. I use the Gmail notifier to check out when i get new replies. Should I stay in Ubuntu? do i need to use the mkdir commands and then the commands you have given me.Also just curios' but some one a few posts back some one suggested that I use the following command line:


sudo grub-install /dev/sdd

what do you think?
 
Old 01-08-2009, 07:11 PM   #18
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,869

Rep: Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247
You would not be able to view the Ubuntu files after re-booting without doing the "mkdir /mnt/ubuntu" command again. You need an entry in your /etc/fstab file for it for it to be permanent. So, if you are switching back and forth and re-booting you need to do the "mkdir" command each time. I don't see how that would have anything to do with grub though. Grub should be able to find the files. Try running the "mkdir" command again and then do the Grub.

After you do the "mkdir", do the mount:
Quote:
ubuntu@ubuntu:~$ sudo mount -t ext3 /dev/sdd1 /mnt/ubuntu
then do the ls to see if the files are there:

Quote:
ls /mnt/ubuntu/ (see if the vmlinuz file is listed)
ls /mnt/ubuntu/boot/grub/ (see if the stage1, stage2 files are there)
You could try the command you mentioned to install Grub suggested earlier. I never use it but rather use:

sudo grub
root (hd2,0)
setup (hd2)
quit

The commands above should re-install grub files to (hd2,0) which is sdd1 in your case and put the stage1 file in the master boot record of (hd2) which is sdd in your case.

No sure why you can't find the Grub files you found earlier?
 
Old 01-09-2009, 02:44 AM   #19
demonbladenet
Member
 
Registered: Dec 2008
Posts: 38

Original Poster
Rep: Reputation: 15
ran the following


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> root (hd2,0)
root (hd2,0)
grub> setup (hd2)
setup (hd2)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e2fs_stage1_5" exists... yes
Running "embed /boot/grub/e2fs_stage1_5 (hd2)"... 16 sectors are embedded.
succeeded
Running "install /boot/grub/stage1 (hd2) (hd2)1+16 p (hd2,0)/boot/grub/stage2 /boot/grub/menu.lst"... succeeded
Done.
grub> quit
quit
ubuntu@ubuntu:~$

booyed Windows okay,try to boot external (sdd) and got an error21
 
Old 01-09-2009, 09:27 AM   #20
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,869

Rep: Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247
Grub Error 21: Selected Disk Does Not Exist.

You indicated you wanted Grub on the external drive which is what the commands you used did. In order to boot Ubuntu that way, you will need to set the external as first boot priority in the BIOS each time you want to boot it. If windows booted, it's because you have the internal (where you have windows) set to boot first. This is what you said you wanted.
 
Old 01-09-2009, 10:59 PM   #21
demonbladenet
Member
 
Registered: Dec 2008
Posts: 38

Original Poster
Rep: Reputation: 15
I did set my Bios to boot the external first. I got an "error 21" then i re-set my bios to boot the internal just to check and make sure my windows was intact and accessible and it is ..so I'm dealing with an error 21
 
Old 01-10-2009, 02:36 PM   #22
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,869

Rep: Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247
After you ran the commands I suggested in my last post, did you see any results (list of files/directories) form the "ls" command?

Use your Ubuntu CD. Load it and open a terminal/konsole window and enter the command: sudo grub, should get the grub prompt (grub>), type the following consecutively:

geometry (hd0)
geometry (hd1)
geometry (hd2)

This should show some partition information as grub sees it. Post output.
 
Old 01-10-2009, 04:16 PM   #23
demonbladenet
Member
 
Registered: Dec 2008
Posts: 38

Original Poster
Rep: Reputation: 15
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> geometry(hd0)
geometry(hd0)

Error 27: Unrecognized command
grub> geometry (hd0)
geometry (hd0)
drive 0x80: C/H/S = 15288/16/32, The number of sectors = 7827456, /dev/sdf
Partition num: 0, Filesystem type is fat, partition type 0xc
grub> geometry (hd1)
geometry (hd1)

Error 21: Selected disk does not exist
grub> geometry (hd1)
geometry (hd1)

Error 21: Selected disk does not exist
grub> geometry (hd2)
geometry (hd2)

Error 21: Selected disk does not exist
grub>
 
Old 01-10-2009, 04:35 PM   #24
demonbladenet
Member
 
Registered: Dec 2008
Posts: 38

Original Poster
Rep: Reputation: 15
i've got some drive info..maybe it will help




size 460 GB
file system ext3 (1.0)

mount point /media/disk
mount options rw nosuid nodev errors=continue data=ordered

the disk is seen on the desktop when using Live CD
 
Old 01-10-2009, 07:33 PM   #25
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,869

Rep: Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247
Are you keeping your external drive attached/plugged in?

sometimes you are able to find files and other times not?

Your grub install seemed to be successful.
 
Old 01-11-2009, 03:00 AM   #26
demonbladenet
Member
 
Registered: Dec 2008
Posts: 38

Original Poster
Rep: Reputation: 15
yes I keep the external plugged in and powered up 24/7

what is error 21?
 
Old 01-11-2009, 11:57 AM   #27
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,869

Rep: Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247
Quote:
21 : Selected disk does not exist
This error is returned if the device part of a device- or full file name refers to a disk or BIOS device that is not present or not recognized by the BIOS in the system.
The reason I asked if you were keeping it plugged in is that in one post you got results from your grub find commands and in another you got no results? That doesn't make sense. You might try running the geometry command from grub using higher numbers, like (hd3), (hd4) since you have a number of drives but, on the other hand, you got results from the grub find command earlier showing the grub files on (hd2,0)so...??
 
Old 01-11-2009, 02:32 PM   #28
demonbladenet
Member
 
Registered: Dec 2008
Posts: 38

Original Poster
Rep: Reputation: 15
okay...tell you what.
send me all the commands that will help analyze exactly what all si wher. I'm keeping my external on and I'll fdisk it and post it in a few minutes from Ubuntu using the live disk to get into linux and I'll stay in linux until i get this fixed (man when i get this running I'm going to protect my HDD like they are gold!!!)I'm posting an fdisk first

Last edited by demonbladenet; 01-11-2009 at 02:50 PM.
 
Old 01-11-2009, 02:49 PM   #29
demonbladenet
Member
 
Registered: Dec 2008
Posts: 38

Original Poster
Rep: Reputation: 15
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 Linux
/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:~$

sdd is the external hard drive that has the Linux swap file installed and is the intended hard drive for my Ubuntu OS install

Last edited by demonbladenet; 01-11-2009 at 02:53 PM.
 
Old 01-11-2009, 06:33 PM   #30
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,869

Rep: Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247
The only partition you have on which Linux might be installed is sdd1, sdd2 is an extended partition which cannot contain any OS or data, sdd3 is a swap partition which is used if you need more RAM.

Log in to a terminal as root and run the grub commands again. As root do:

grub (to get grub prompt, from grub prompt run again)

find /vmlinuz
find /boot/grub/stage1
find /boot/grub/stage2

geometry (hd0)
geometry (hd1)
geometry (hd2)
geometry (hd3)

Below is the partial ouput of the command on my machine. Yours should be similar but, obviously not the same.

Quote:
grub> geometry (hd1)
drive 0x81: C/H/S = 16383/255/63, The number of sectors = 234441648, /dev/hdb
Partition num: 0, Filesystem type is reiserfs, partition type 0x83
Partition num: 1, Filesystem type unknown, partition type 0x82
I'm not sure why Grub will sometimes come up with positive output and other times not. You might check to see if the cables to your external are secure.
 
  


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 09:02 PM.

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