LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-22-2009, 09:56 PM   #1
zonemikel
Member
 
Registered: Apr 2006
Posts: 94

Rep: Reputation: 15
Unhappy Trying to restore lilo and my hdd after it started getting errors, wont boot ?


Ok i have a old web/file-server/router that has slackware on it. It has run great for a long time, but recently it started to get read errors on the hdd so i figured i would duplicate the disk and make it boot off of another disk.

So i made a partition on another disk and did "dd" and successfully copied it over. Then i did it again on another hdd just to be sure i got all my info.

Then on the original hdd i edited /etc/lilo.conf and tried to tell it to boot the second hdd. then i ran "lilo -v" so it would update. It was really hard to do it while the i/o errors were writing to the screen. Anyway when i restarted the computer would start and instead of my lilo boot menu i got a bunch of 0's ?

Anyway i've used fdisk and set the partitions that are duplicates of my original drive as bootable ('a' option in fdisk). But, every time i try and load one of those drives it will just boot and i'll get a black screen, no words just a black screen.

In desperation i installed slax on the original failing hdd and then tried to edit the /boot/slax.cfg to get it to boot the original partition but it just automatically startz slax (and it dont work).

Anyway, how do i get it to boot the duplicates of the original hdd that i made ?

Right now i'm running a ubuntu live cd with my firewallscript so at least i have internet, but no web/file server. I'll download the latest version of slackware just in case i need to start over. At least all the data is there and safe.

thanks
 
Old 08-22-2009, 10:38 PM   #2
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Devuan
Posts: 3,656
Blog Entries: 33

Rep: Reputation: 283Reputation: 283Reputation: 283
Hi, First, I don't admin a critical data server.

I would use dd_rhelp and dd_rescue

if dd got all the files in tact,

you should just install lilo or grub (the) on the backed up drive and use it.

And get the bad-block/sectors hd out of the system.

Use the "mark badblocks" to re-use the hd for some other non-boot critical task.

Cheers Glenn

Last edited by GlennsPref; 08-23-2009 at 04:47 PM.
 
Old 08-23-2009, 08:26 AM   #3
zonemikel
Member
 
Registered: Apr 2006
Posts: 94

Original Poster
Rep: Reputation: 15
Quote:
you should just install lilo or grub the the backed up drive and use it.
Exactly ! But how do i go about doing that ? I cant "boot" from the drive until it has lilo/grub installed on it so when i load a live cd or something and type "lilo -v -C" or "grub install" it always tries to load it on the currently running hdd.

Sorry for the stupid/easy question, but how can i install lilo/grub with say, a ubuntu live cd ?
 
Old 08-23-2009, 03:04 PM   #4
zonemikel
Member
 
Registered: Apr 2006
Posts: 94

Original Poster
Rep: Reputation: 15
Ok after much working and stuff i have a semi workable system. The only way i can boot however is by the slackware cd, after that i have a system that works.

I had to reinstall slackware (latest version). I still have my old slackware install on another partition. Without rambling too much here are my direct questions.

1.) every time i boot and allow the hdd to boot it just shows a bunch of 00's on the screen. Like half the screen is filled with 00's what causes this ?

2.) I think when i copied my old fs over to a new drive i made the partition but never formatted it. When i boot this new partition it eventually says something about the superblock and only lets me go into single user mode to "fix" the problem. I can see my whole fs there everything is ok and intact. Is there anyway i can bypass this check or can i make a file system on this partition without deleting everything on it? I would hate to have to make yet another partition and try and get it working.

Thanks for all the help !
 
Old 08-23-2009, 05:39 PM   #5
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Devuan
Posts: 3,656
Blog Entries: 33

Rep: Reputation: 283Reputation: 283Reputation: 283
Quote:
1.) every time i boot and allow the hdd to boot it just shows a bunch of 00's on the screen. Like half the screen is filled with 00's what causes this ?
The boot manager is told where to look, 00 00 00 00 00 00 indicates Wrong drive found.

Quote:
I think when i copied my old fs over to a new drive i made the partition but never formatted it. When i boot this new partition it eventually says something about the superblock and only lets me go into single user mode to "fix" the problem. I can see my whole fs there everything is ok and intact. Is there anyway i can bypass this check or can i make a file system on this partition without deleting everything on it?
You need to find where to configure lilo (bootmanager) in slack, system-tools?.
Then select the os and partition you want to boot as the default OS.

You may find that if /etc/fstab is copied it may contain obsolete uuid's for the old HD and partitions.

I would go back, and backup what I want to save, setup/install slack from scratch then when the system is up and running, rsync the backup files to the new, clean install.

you may be able to fix fstab manually, but you may have to research first.
for instance....
Code:
# Entry for /dev/sda6 :
UUID=8f60d791-9082-4a55-b7ff-90767e62c5bc / ext3 relatime 1 1
# Entry for /dev/sda5 :
UUID=668a0c18-9a69-48d8-bc75-a956c8a0fe82 /boot ext3 relatime 1 2
# Entry for /dev/sdb10 :
UUID=2d7c228a-3eba-4b81-8f10-10dd9cfdea17 /home ext3 relatime 1 2
# Entry for /dev/sda10 :
UUID=ba99e8a3-9e8c-430c-b20a-b64377a2155c /tmp ext3 relatime 1 2
# Entry for /dev/sdb2 :
UUID=24eda376-9395-4881-a4f6-2e0c6e624b74 swap swap defaults 0 0

...lines removed for clarity....
If sda6 is the / partition, you may edit these lines like this....

Code:
/dev/sda6 / ext3 relatime 1 1
/dev/sda5 /boot ext3 relatime 1 2
/dev/sdb10 /home ext3 relatime 1 2
/dev/sda10 /tmp ext3 relatime 1 2
/dev/sdb2 swap swap defaults 0 0
Code:
Find uuid of a partition

udevinfo -q env -n /dev/sdb1
e2fsck exit codes
Quote:
Exit Code
The exit code returned by e2fsck is the sum of the following conditions:
0 - No errors
1 - File system errors corrected
2 - File system errors corrected, system should
be rebooted
4 - File system errors left uncorrected
8 - Operational error
16 - Usage or syntax error
32 - E2fsck canceled by user request
128 - Shared library error
Also check the links below this post, for more help.

regards Glenn
 
Old 08-23-2009, 06:17 PM   #6
zonemikel
Member
 
Registered: Apr 2006
Posts: 94

Original Poster
Rep: Reputation: 15
Quote:
You may find that if /etc/fstab is copied it may contain obsolete uuid's for the old HD and partitions.
YES ! thanks! while there are no uuid's everything in fstab was still pointing at /dev/hda when i put the os on /dev/hdb so obviously everything was screwing up. I actually fixed my other problem from before (superblock stuff) now it was saying that it couldnt find this and that and just freezing up. This was because it was pointing to a hd that was no longer even in the system.

thanks a million i changed fstab but dont have time to go restart it all right now. I'm pretty sure it will work. I also have been working on the new slackware install and have it working as a router and webserver ... just some tweaks etc.
 
Old 08-23-2009, 11:00 PM   #7
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Devuan
Posts: 3,656
Blog Entries: 33

Rep: Reputation: 283Reputation: 283Reputation: 283
Glad you got it working.

Cheers Glenn
 
  


Reply



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
wont boot after restore riverdragon Linux - Software 1 12-17-2008 02:50 PM
Lilo lost, Install disk failing to restore Lilo on dual boot? Dobie Linux - Newbie 2 05-05-2004 05:00 PM
I install Slackware on small HDD with LILO, can't boot LILO? kleptophobiac Slackware 4 08-10-2003 04:50 PM
RHL 8 on *other* hdd and XP wont boot ashayh Linux - General 0 02-04-2003 02:11 AM
LILO & W2K boot restore anymouse Linux - Newbie 0 01-31-2003 02:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:40 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
Open Source Consulting | Domain Registration