- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- boot disk substituition
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2003 07:06 PM
10-07-2003 07:06 PM
I got a linux box with 2 ide disks, hda and hdb.
the boot disk (hda) is giving some signals of an imminent mechanical failure (sometimes I hear strange noises from it). But it is still working.
I'm thinking to bring the whole linux system on hdb, connect it as primary master and then boot from it. the old broken hda will become the new hdb... and then I'll wait for its death :-)
How can I do this? I want to keep this working linux without reinstallation.
Eventually I can connect these disks (one at time) to another linux machine with a lot of disk space, in order make some kind of copy between them.
thanks a lot!
Claudio
P.S.: these disks have different capacity. 6 GB for hda (4 GB used), 5.1 GB for hdb.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2003 07:25 PM
10-07-2003 07:25 PM
Re: boot disk substituition
You can try mirroring the disk ,but since your second disk is smaller then the first -I'm not sure it'll work.
Best Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2003 07:48 PM
10-07-2003 07:48 PM
Re: boot disk substituition
Regards,
Sergejs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2003 08:02 PM
10-07-2003 08:02 PM
Re: boot disk substituition
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2003 08:06 PM
10-07-2003 08:06 PM
Re: boot disk substituition
the second disk is smaller than the first, but the data can fit into it.
hda is partitioned so:
/dev/hda1: 1.8 GB for /
/dev/hda2: 200 MB swap space
/dev/hda3: 4 GB for /home
/home isn't so important, I can copy its content somewhere else. just keep the system working on the second disk is enough for me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2003 08:43 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2003 09:35 PM
10-07-2003 09:35 PM
Re: boot disk substituition
make a bootable floppy
partition disk
mark first partition as bootable (from fdisk)
make a file system's' on partition's'
from the file found in / write script like
ex:
rsync -avz /bin /bck
rsync -avz /boot /bck
rsync -avz /dev /bck
rsync -avz /etc /bck
rsync -avz /home /bck
rsync -avz /initrd /bck
rsync -avz /lib /bck
rsync -avz /lost+found /bck
rsync -avz /misc /bck
rsync -avz /mnt /bck
rsync -avz /opt /bck
rsync -avz /root /bck
rsync -avz /sbin /bck
rsync -avz /System.map /bck
rsync -avz /tmp /bck
rsync -avz /usr /bck
rsync -avz /var /bck
rsync -avz /vmlinuz /bck
bring system to single user
run your tailored rsync script
stop system
physicaly switch disk hda to hdb, hdb to hda
boot from floppy
watch for error
login as root
run lilo ro grube
correct errors ?
take out floppy
boot
watch for errors ?
when all is well add hdb to fstab as read only
note that he command rsync could be used to remote node but then not from single user mode !
The above could give you a few error's on open files (not a lot from single user mode !)
That iw why I thing in theses senario Ghost is still the best/safest way.
Hope this helps
J-P
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2003 09:58 PM
10-07-2003 09:58 PM
Re: boot disk substituition
bring system to single user
------------
mount /dev/hdb /bck
-------------
run your tailored rsync script
Mea maximila culpa.
J-P
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2003 10:06 PM
10-07-2003 10:06 PM
Re: boot disk substituition
thanks again,
Claudio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2003 09:18 PM
10-13-2003 09:18 PM
Re: boot disk substituition
I tried the dump/restore solution... It seemed to me enough simple.
1. connected the 6GB disk on another linux machine as IDE primary slave.
2. 'dump'ed the /dev/hdb1 and /dev/hdb3 to file.
3. connected the 5.1GB disk on the same machine.
4. repartitioned this disk like the old one: /dev/hdb1 (ext2), /dev/hdb2 (swap), /dev/hdb3 (ext2) BUT a little bit smaller partitions.
5. 'restore'ed from file the partitions 1 and 3.
6. reconnected this disk on his original machine, as primary master.
7. boot from floppy, a floppy that works well with the original boot disk (the 6GB one). I still haven't installed grub on this hard disk.
8. got an error: 'kernel panic: no init found. try passing the init= parameter' or something similar.
I think that the init executable file should be exactly where it was on the old disk... What's wrong?
thanks!
Ciao
Claudio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2003 09:52 PM
10-13-2003 09:52 PM
Re: boot disk substituition
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2003 10:35 PM
10-13-2003 10:35 PM
Re: boot disk substituition
#/etc/lilo
if it is lilo you had on disk.
J-P
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2003 11:47 PM
10-13-2003 11:47 PM
Re: boot disk substituition
It may be that your "root=" line is no longer correct on the floppy. Check which device is which in the boot messages you get before your panic. Try a append="init=/bin/sh" in your lilo.conf which should at least get you a shell on boot so you can see what state your machine is in. Check what has been mounted where. If this fails then your / filesystem is probably not mounted.
One other option is to create a small partition on your new disk and install a tiny linux on it. Boot that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2003 06:01 AM
10-14-2003 06:01 AM
Re: boot disk substituition
Dit you try this:
dd if=/dev/hda1 of=/dev/hdb1
succes
Idriz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2003 01:17 AM
10-16-2003 01:17 AM
Re: boot disk substituition
I be interested by how you did it
J-P (0 pts for this just a question ?, tks)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2003 01:57 AM
10-16-2003 01:57 AM
Re: boot disk substituition
Answering to Mark Grant, the root= parameter is correct. It is root=/dev/hda1 and with the old disk (6GB) it works. I have copied that partition in the first partition of the new disk (5.1GB) so, when I connect the new disk
as primary master the boot partition is always /dev/hda1.
I'm quite sure that the kernel on the floppy hangs because it cannot mount /dev/hda1 of the new disk as /. But I don't know why.
The suggestion of I.Delic (dd if=/dev/hda1 of=/dev/hdb1) isn't good, I think: the source and the destination partitions have different sizes.
I suspended (temporarily) these experiments when I connected the old disk (6GB) as primary master, the new disk (5.1GB) as secondary master and booted rom floppy, expecting to have /dev/hda1 as root partition.
After a while I realized that the root partition was /dev/hdc1 (?!?!?!???) mmmmmh... Now I got to discover what's happened.
I'll keep you informed.
Ciao
Claudio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2003 01:25 PM
10-18-2003 01:25 PM
Re: boot disk substituition
I suppose (but I'm not sure) that the boot floppy's kernel mounts in read-only mode the /dev/hda1 partition, read the /etc/fstab file (where /dev/hda1 is specified as ext3 filesystem), then it tries to remount that partition in read-write mode using ext3. As I said before, it is an ext2 filesystem so the system hangs.
I repeated the restore process after formatting /dev/hda1 of the new harddisk using ext3, then boot from floppy, install grub, reboot again. Wow... it worked!
Sergejs Svitnevs' solution, dump & restore, worked great. Thanks to all!
Ciao
Claudio