From: jbeteta@yahoo.com (Jorge_Beteta) Subject: Re: Making a bootable second hard disk (and larger filesystems) Date: 25 Jun 2003 15:39:14 -0700 References: <5140b91e.0306232046.15ed5c37@posting.google.com>
<8oT6kbEtjNB@zocki.toppoint.de> I got the solution thanks to Sppalser. I'll share it with everybody. I think it's important. If you wish to copy the whole disk to a second one, first of all you need to back up any data on your second drive you wish to keep. Next you will need to unmount your second hard disk filesystem. Then you will need to redivvy the second hard disk to include the same filesystems as your "root" disk. Keep your boot and swap slices the same size then let root have the rest of the disk. However you will need to name them something other than boot, swap, and root for the purposes of copying the files. Name them something like "newboot", "newswap", "newroot". NOTE: The newboot slice must be a filesystem type of "EAFS", otherwise system will not boot. Use the following to get into the divvy:
# divvy /dev/rhd1a
Next you will need to comple your file list to be copied. Make sure
you are pathed to root then do the following:
# find . -depth -print > /tmp/file_list
Once your file list is compiled you will need to mount your target
filesystems and create a mount point for your boot filesystem within
the new root. Use the following commands:
# mount /dev/newroot /mnt
# mkdir /mnt/stand
# mount /dev/newboot /mnt/stand
Now you should be ready to copy files. Use the following command
string:
# cat /tmp/file_list | cpio -pdmuv /mnt
This will copy all the files from your smaller source drive to the
larger target drive.
Once the files have been copied you will need to make the target drive
bootable. We do this by writing out a boot loader and rewrite the
master boot record using the following commands:
# dd if=/etc/hdboot0 of=/dev/rhd1a
# dd if=/etc/hdboot1 of=/dev/rhd1a bs=1k seek=1
# dparam -w /dev/rhd10
Unmount your target filesystems:
# umount /mnt/stand
# umount /mnt
Now perform a shutdown and pull out your original drive and re-id your
new boot drive accordingly then reboot your server to the new drive.
Once you are comfortable that everything is working as desired you
could put the old boot drive into the system as a second drive and
re-divvy the drive to give some extra data storage.
Sppalser
Have you tried Searching this site?
Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates
This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.
Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.
Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.
We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.
Click here to add your comments
Don't miss responses! Subscribe to Comments by RSS or by Email
Click here to add your comments
If you want a picture to show with your comment, go get a Gravatar