LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices



Reply
 
Search this Thread
Old 05-05-2009, 12:15 PM   #1
hit1mn
LQ Newbie
 
Registered: May 2009
Posts: 11

Rep: Reputation: 0
cannot boot ubuntu 9.04 server... grub issue?


hi all,

Long story short is I restored a clonezilla image a couple days ago and ever since have been unable to boot my server.

After reboot and bios splash screen I sit at a blinking cursor.

This drive has been zeroed out, image reloaded, zeroed out a second time and now completed a local fresh install. This install was done w all defaults except I changed the host name to localhost and took all the default partitioning.


After the first image load I did a good amount of reasearch and was successful in reinstalling grub but again was brought back to the blinking cursor.

I'm down to wondering if it's trying to boot to the wrong drive/partition

I am currently working off the live cd

ubuntu@ubuntu:/dev$ sudo fdisk -l

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

Device Boot Start End Blocks Id System
/dev/sda1 * 1 58336 468583888+ 83 Linux
/dev/sda2 58337 60801 19800112+ 5 Extended
/dev/sda5 58337 60801 19800081 82 Linux swap / Solaris

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0002e48d

Device Boot Start End Blocks Id System
/dev/sdb1 1 121601 976760001 83 Linux

Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000ab931

Device Boot Start End Blocks Id System
/dev/sdc1 1 118653 953080191 83 Linux
/dev/sdc2 118654 121601 23679810 5 Extended
/dev/sdc5 118654 121601 23679778+ 82 Linux swap / Solaris
ubuntu@ubuntu:/dev$


any suggestions?

Last edited by hit1mn; 05-05-2009 at 12:16 PM.
 
Old 05-06-2009, 05:16 AM   #2
aus9
Guru
 
Registered: Oct 2003
Posts: 5,060

Rep: Reputation: Disabled
hi

I do not use clonezilla but something similar called partimage off a live cd.

1) where exactly is the source image you are restoring pls

2) have you tried to restore merely the mbr after zeroing and then rebooting and then restoring the partition as the mbr is different from the partition.

technically speaking ...the image of the first partition contains the mbr image so if you never imaged that...maybe you do not have a mbr to restore from?

3) partimage can not restore to a smaller size partition so its possible to eliminate certain drives if you are unsure.
 
Old 05-06-2009, 10:33 AM   #3
yancek
Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 5,102

Rep: Reputation: 815Reputation: 815Reputation: 815Reputation: 815Reputation: 815Reputation: 815Reputation: 815
I think more information would be needed to get some real help if you have not resolved this yet. What was on the image you restored? Was it an image of a partition, multiple partitions, an entire drive? If an entire drive, did you select the option in clonezilla to include mbr in image? Which drive/partition did you copy from/to?
 
Old 05-06-2009, 04:09 PM   #4
hit1mn
LQ Newbie
 
Registered: May 2009
Posts: 11

Original Poster
Rep: Reputation: 0
the image is stored on a separate internal hd. since this was my first time using clonezilla I'm not sure about the mbr. I imaged the entire disk which I would expect to include the mbr.

yancek- this is the same issue you responded to on linuxforums. my apologies...i am getting desperate for a solution.

I did complete a successful reload of the os to the local disk which automagically does all the partitioning. here is some updated output...


also, i get no grub msgs, just a blinking cursor after the bios splash screen


THANKS!

grub> find /boot/grub/stage1
(hd0,0)

grub> root (hd0,0)

grub> setup (hd0,0)
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 (hd0,0)"... failed (this is not fatal)
Running "embed /boot/grub/e2fs_stage1_5 (hd0,0)"... failed (this is not fatal)
Running "install /boot/grub/stage1 (hd0,0) /boot/grub/stage2 p /boot/grub/menu
.lst "... succeeded
Done.

grub> geometry (hd0)
drive 0x80: C/H/S = 60801/255/63, The number of sectors = 976773168, /dev/sda
Partition num: 0, Filesystem type is ext2fs, partition type 0x83
Partition num: 4, Filesystem type unknown, partition type 0x82

grub> geometry (hd1)
drive 0x81: C/H/S = 121601/255/63, The number of sectors = 1953525168, /dev/sdb
Partition num: 0, Filesystem type is ext2fs, partition type 0x83

grub> geometry (hd2)
drive 0x82: C/H/S = 121601/255/63, The number of sectors = 1953525168, /dev/sdc
Partition num: 0, Filesystem type is ext2fs, partition type 0x83

grub>
 
Old 05-06-2009, 08:25 PM   #5
yancek
Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 5,102

Rep: Reputation: 815Reputation: 815Reputation: 815Reputation: 815Reputation: 815Reputation: 815Reputation: 815
You did 'root (hd0,0) correctly but the setup entry you have listed is wrong, unless that's a typo?? it should be 'setup (hd0)' (without quotes).

Your geometry output shows three drives, (hd0), (hd1) and (hd2)?? I though we were dealing with partitions from one drive? I don't recall the details of your other post but if the commands above don't work (the setup (hd0)) then you could try the same commands and change the root entries to 'root (hd1,0), then do the setup (hd0) and re-boot, and if that fails do root (hd2,0) and then setup (hd0). These commands should install Grub to the partition referenced and put the staqe1 file in the mbr. Hopefully, the first one will work. You have three Linux OS partitions as possibilities and they are the first partition on each drive.
 
Old 05-06-2009, 09:22 PM   #6
hit1mn
LQ Newbie
 
Registered: May 2009
Posts: 11

Original Poster
Rep: Reputation: 0
ok, yes we are dealing with hd0 only. one of the other 2 drives contains data and the other is blank.

i ran setup again with your correction and it outputs "succeeded" but once again on reboot it goes to blinking cursor, no grub errors.


SO i deleted all the partitions on the disk

ubuntu@ubuntu:~$ sudo sfdisk --force /dev/sda
Checking that no-one is using this disk right now ...
OK

Disk /dev/sda: 60801 cylinders, 255 heads, 63 sectors/track
Old situation:
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

Device Boot Start End #cyls #blocks Id System
/dev/sda1 0 - 0 0 0 Empty
/dev/sda2 0 - 0 0 0 Empty
/dev/sda3 0 - 0 0 0 Empty
/dev/sda4 0 - 0 0 0 Empty
Input in the following format; absent fields get a default value.
<start> <size> <type [E,S,L,X,hex]> <bootable [-,*]> <c,h,s> <c,h,s>
Usually you only need to specify <start> and <size> (and perhaps <type>).

/dev/sda1 :


to me this looks like a blank disk. so in theory i should be able to run the os install and i should be good to go...YES?
 
Old 05-06-2009, 11:39 PM   #7
yancek
Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 5,102

Rep: Reputation: 815Reputation: 815Reputation: 815Reputation: 815Reputation: 815Reputation: 815Reputation: 815
It looks like a blank disk to me.

I'm not sure I understand what you are trying to do. You had multiple Linux partitions on a disk and cloned them, saved as an image and tried to re-install the image? If that's what you were doing, I don't see why you are getting different drive names, sda, sdb, sdc ??
 
Old 05-07-2009, 02:25 AM   #8
aus9
Guru
 
Registered: Oct 2003
Posts: 5,060

Rep: Reputation: Disabled
hi

just to be explicit...what yancek wants for grub re-embed is this

boot live cd

Code:
su
grub...prompt changes to grub
root (hd0,0)
setup (hd0)
quit
where we assume /boot/grub is on hd0,0...as shown by the find command

you also get succeeded message if you embed grub to its own root partition ...hd0,0 but that is not what I want.

2) I could repeat you first restore the mbr and then restore the partition but lets see what happens with any confusion over grub first heh?

Last edited by aus9; 05-12-2009 at 08:07 PM. Reason: bad spelling error
 
Old 05-07-2009, 06:42 AM   #9
hit1mn
LQ Newbie
 
Registered: May 2009
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by yancek View Post
It looks like a blank disk to me.

I'm not sure I understand what you are trying to do. You had multiple Linux partitions on a disk and cloned them, saved as an image and tried to re-install the image? If that's what you were doing, I don't see why you are getting different drive names, sda, sdb, sdc ??

My apologies if I'm all over the place. This machine has been down for 4 days now. My only goal at this point is to get the machine operable.

Since this was first time using clonezilla I'm not confident in the integrity of the image, if or if not it contains the mbr.

So far I have not been able to get it to boot even with totally formatting the disk and running the os install locally.

Ran smartctl long test on the disk overnight w zero errors.

For kicks I'm going to load the os once more and see what happens. This has NOT worked yet.

Thanks!


ps- If this doesn't work I will post again the find grub and embed procedure.

Last edited by hit1mn; 05-07-2009 at 06:44 AM.
 
Old 05-07-2009, 07:50 AM   #10
hit1mn
LQ Newbie
 
Registered: May 2009
Posts: 11

Original Poster
Rep: Reputation: 0
Completed fresh local os install w all the defaults-no errors


ubuntu@ubuntu:~$ sudo sfdisk --force /dev/sda
Checking that no-one is using this disk right now ...
BLKRRPART: Device or resource busy

This disk is currently in use - repartitioning is probably a bad idea.
Umount all file systems, and swapoff all swap partitions on this disk.
Use the --no-reread flag to suppress this check.

Disk /dev/sda: 60801 cylinders, 255 heads, 63 sectors/track
Old situation:
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

Device Boot Start End #cyls #blocks Id System
/dev/sda1 * 0+ 58335 58336- 468583888+ 83 Linux
/dev/sda2 58336 60800 2465 19800112+ 5 Extended
/dev/sda3 0 - 0 0 0 Empty
/dev/sda4 0 - 0 0 0 Empty
/dev/sda5 58336+ 60800 2465- 19800081 82 Linux swap / Solaris
Input in the following format; absent fields get a default value.
<start> <size> <type [E,S,L,X,hex]> <bootable [-,*]> <c,h,s> <c,h,s>
Usually you only need to specify <start> and <size> (and perhaps <type>)



grub> find /boot/grub/stage1
(hd0,0)

grub> root (hd0,0)

grub> setup (hd0)
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 (hd0)"... 17 sectors are embedded.
succeeded
Running "install /boot/grub/stage1 (hd0) (hd0)1+17 p (hd0,0)/boot/grub/stage2
/boot/grub/menu.lst"... succeeded
Done.


Do sudo reboot, remove CD...machine bounces, bios splash screen, blinking cursor


this is driving me nutz
 
Old 05-07-2009, 09:09 AM   #11
aus9
Guru
 
Registered: Oct 2003
Posts: 5,060

Rep: Reputation: Disabled
hi

ok thanks for the feedback.

all issues can be summed up as
bios or firmware
hardware
software
configurations

there are still a number of tests that can be done...but I am guessing you are ready to pull the plug?

1) at any stage in the cloning and restoring did you alter the bios settings

2) you can check each mbr of each drive ...its dirty but it works
boot the live cd and

Code:
su
mkdir /z
(an easy reference point for us)
dd if=/dev/sda bs=512 count=1 of=/z/sda
strings /z/sda
eg

Code:
dd if=/dev/sda bs=512 count=1 of=/z/sda
1+0 records in
1+0 records out
512 bytes (512 B) copied, 3.5472e-05 s, 14.4 MB/s
root@siduxbox:~# strings /z/sda
GRUB
ZRrK
D|f1
GRUB
Geom
Hard Disk
Read
 Error
then do the same for sdb and sdc

report what you find pls in summary that is...grub is in sda, not in sdb or sdc
and you may see some strings that indicate a ms bootloader...so report them

if unsure report the lot inside a code box

3) Why?

maybe..in the initial cloning...the wrong drive was imaged...yes I know you have different sizes...but you have not reported what you found when you attempted to restore mbr and restore partition which is what I asked the first time heh heh
 
Old 05-07-2009, 11:12 AM   #12
yancek
Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 5,102

Rep: Reputation: 815Reputation: 815Reputation: 815Reputation: 815Reputation: 815Reputation: 815Reputation: 815
I'm confused about what you are doing now.

Quote:
Completed fresh local os install w all the defaults-no errors
Does that mean you re-installed Ubuntu from the Installation CD or you tried to restore the Ubuntu image you created earlier?

I'm still curious about why you have different drive labels (sda, sdb, sdc)?
 
Old 05-09-2009, 10:52 AM   #13
hit1mn
LQ Newbie
 
Registered: May 2009
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
there are still a number of tests that can be done...but I am guessing you are ready to pull the plug?

1) at any stage in the cloning and restoring did you alter the bios settings

not going to pull the plug, this is a newly built machine and was working great until I restored the image.

no bios changes have been made during this process

and just to be clear to yancek- Yes, at this point I have a fresh local install of the os on sda. sdb and sdc are 2 other internal drives that have not been used except sdb has some data and the image that i originally restored from.

sda is the only device I am trying to boot from and is the device that had the working bootable os until I ran the restore.

here is the output from the code requested by aus9

ubuntu@ubuntu:~$ sudo dd if=/dev/sda bs=512 count=1 of=/z/sda
1+0 records in
1+0 records out
512 bytes (512 B) copied, 3.1033e-05 s, 16.5 MB/s
ubuntu@ubuntu:~$ strings /z/sda
ZRrI
D|f1
GRUB
Geom
Hard Disk
Read
Error
7a@\



ubuntu@ubuntu:~$ sudo dd if=/dev/sdb bs=512 count=1 of=/z/sdb
1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.452508 s, 1.1 kB/s
ubuntu@ubuntu:~$ strings /z/sdb
ubuntu@ubuntu:~$

ubuntu@ubuntu:~$ sudo dd if=/dev/sdc bs=512 count=1 of=/z/sdc
1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.454342 s, 1.1 kB/s
ubuntu@ubuntu:~$ strings /z/sdc
ubuntu@ubuntu:~$

Quote:
maybe..in the initial cloning...the wrong drive was imaged...yes I know you have different sizes...but you have not reported what you found when you attempted to restore mbr and restore partition which is what I asked the first time heh heh
understood- since I am not 100% sure of the integrity of the image i have resorted to starting from scratch


I JUST WANT TO GET A BOOTABLE OS SETUP ON SDA AT THIS POINT

thanks again
 
Old 05-09-2009, 11:03 PM   #14
aus9
Guru
 
Registered: Oct 2003
Posts: 5,060

Rep: Reputation: Disabled
hi

ok I have found one issue...there may be more.

I assume your live cd/dvd was ubuntu?

your strings output is diff from mine....and I was curious if I used Knoppix instead of sidux...if I got a diff strings...so I am in Knoppix in this post....I redid knoppix grub into mbr and ran my strings output....and its the same as my sidux.

THEREFORE....yours is wrong. in my arrogant opinion.

2) a side issue is that some distros have not caught up with the inode change.

http://www.linuxquestions.org/questi...grub+inode+256

QUESTION 1 can you name the live product you used please

QUESTION 2
if others like to report their strings are the same as mine...we have democracy...but as you want resolution....can you consider downloading a live cd or dvd....not based on ubuntu.

being biased I suggest

http://sidux.com/Article485.html

or go to distrowatch.com and dl the latest knoppix?

I am not suggesting you run sidux or knoppix...I am only concerned why you have wrong strings output so need to eliminate that as being an issue....so download the live cd and redo grub into mbr please

QUESTION 3
if that fails for you...pls post inside a code box..your current /boot/menu.lst please

Last edited by aus9; 05-09-2009 at 11:07 PM.
 
Old 05-11-2009, 08:25 AM   #15
hit1mn
LQ Newbie
 
Registered: May 2009
Posts: 11

Original Poster
Rep: Reputation: 0
The live CD I have been using is Ubuntu.


dl Sidux and ran grub procedure...

as you can see the strings output is the same with this os.



sidux@sidux:~$ su -
root@sidux:~# grub
Probing devices to guess BIOS drives. This may take a long time.


GNU GRUB version 0.97 (640K lower / 3072K upper memory)

[ 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/stage1
find /boot/grub/stage1
(hd0,0)
grub> root (hd0,0)
root (hd0,0)
Filesystem type is ext2fs, partition type 0x83
grub> setup (hd0)
setup (hd0)
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 (hd0)"... 17 sectors are embedded.
succeeded
Running "install /boot/grub/stage1 (hd0) (hd0)1+17 p (hd0,0)/boot/grub/stage2 /boot/grub/menu.lst"... succeeded
Done.
grub>


REBOOT....sits @ blinking cursor

sidux@sidux:~$ su -
root@sidux:~# mkdir /z
root@sidux:~# dd if=/dev/sda bs=512 count=1 of=/z/sda
1+0 records in
1+0 records out
512 bytes (512 B) copied, 2.4748e-05 s, 20.7 MB/s
root@sidux:~# strings /z/sda
ZRrI
D|f1
GRUB
Geom
Hard Disk
Read
Error
7a@\
root@sidux:~#

Quote:
QUESTION 3
if that fails for you...pls post inside a code box..your current /boot/menu.lst please
I'm not sure about this w the live CD's. Sidux cannot find this file and w the Ubuntu it just has some EXAMPLES ???

thanks
 
  


Reply

Tags
grub, knoppix, live, mbr, sidux, strings, ubuntu


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
Ubuntu 7.10 Dual Boot with XP, ubuntu partition deleted, grub 1.5 error 22 narchy Linux - Newbie 11 02-07-2011 04:54 AM
Ubuntu / CentOS / Grub issue lassik Linux - Newbie 6 04-30-2010 05:56 AM
HP DL585 boot issue with Ubuntu 8.10 Server amd64 Zuludawn Linux - General 0 11-04-2008 02:02 PM
Ubuntu issue / SATA / GRUB 22 carlitoboss Linux - Newbie 24 03-27-2007 07:28 AM


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