Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
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$
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.
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?
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
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.
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?
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 ??
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.
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.
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
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
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.
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.
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
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 ???
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.