Operating System - Linux
1820879 Members
5127 Online
109628 Solutions
New Discussion юеВ

Re: Boot disk under Redhat 5.2

 
SOLVED
Go to solution
Amit Dixit_2
Regular Advisor

Boot disk under Redhat 5.2

Hi,
I want to create a set of bootable diskettes
for my exisiting redhat linux 5.2 how can i
do that.

My goal is to create a boot diskettes and
then taking backup using DUMP and then
restoring it to another system using boot
disk and restore so as to create replica for
the same system.

Please tell me the steps.

Thanks,
Amit.

14 REPLIES 14
Nobody's Hero
Valued Contributor

Re: Boot disk under Redhat 5.2

If you are using Mondo Rescue, you can run mindi and create them. Or you can ru mkbootdisk.
UNIX IS GOOD
Amit Dixit_2
Regular Advisor

Re: Boot disk under Redhat 5.2

Hi,
It would be a great help if you can give me the exact commands to create boot disk and take take dump using dump command on my redhat linux 5.2

Please help me out of this crisis....

Thanks,
Amit.
Huc_1
Honored Contributor
Solution

Re: Boot disk under Redhat 5.2

as root
#mkbootdisk /dev/fd0

read man mkbootdisk

for the dump go to single user mode

#init S

the mount file system you will need to use something like the following would do

#mount -all

to dump for a full do the following

#dump dump -0a -f /dev/nst0 /

the above would do a full dump to the none rewind tape of the / mount point

repeat this for each mount point you want backup (look in cat /etc/fstab) for your mount point

ex : to backup /usr do

#dump dump -0a -f /dev/nst0 /usr

dont rewind tape between backup (notice this is for no rewind tape so your mount point will be on tape one after the other )


when finish reboot .... test your dumps to be sure you have valid backups


Hope this help

J-P



Smile I will feel the difference
Huc_1
Honored Contributor

Re: Boot disk under Redhat 5.2

Amit

I did a typo the line

#dump dump -0a -f /dev/nst0 /

should read


#dump -0a -f /dev/nst0 /

J-P
Smile I will feel the difference
Amit Dixit_2
Regular Advisor

Re: Boot disk under Redhat 5.2

Hi,
Sorry as it is too late here in india now
so i had already given the dump command
i did'nt changed to init level 1 as users
are still working on the system..

i gave the following command

#/sbin/dump -0uBf 2000000 /dev/st0 /dev/hda1

To backup my entire disk 1

can i restore it another machine (i.e. different hardware).

Thanks,
Amit.
Huc_1
Honored Contributor

Re: Boot disk under Redhat 5.2

Amit.

I have never try to

#/sbin/dump -0uBf 2000000 /dev/st0 /dev/hda1

the entire disk ... I use this on mount points
so can not give affirmatif reply to that one, I have always been under the impression this only worked on mount points ??

but if the above worked ???

to restore on other machine I suppose

# restore -xf /dev/st0 /dev/XXX

XXX your hardisk would be logical

Whatever please note that full/backup on a live system with user and applic running this is asking for trouble big time on restore !!! only do this if this is a test run !

Cause think like database, nis, applic etc will be open

Tell me this is a test and tell me if the dump/restore worked on a /dev/hda1 as I always belived this works only on mount point


J-P



Smile I will feel the difference
Amit Dixit_2
Regular Advisor

Re: Boot disk under Redhat 5.2

Hi,
I was able to sucessfully backup my hda1
using dump without shutting it to to
single user mode.

I gave
#/sbin/dump 0uBf 2000000 /dev/st0 /dev/hda1

And it copied me entire disk to the
cartridge.

Please tell me how can a create a boot
disk and and then can i restore this dump
on to another test machine.

Thanks,
Amit.




Huc_1
Honored Contributor

Re: Boot disk under Redhat 5.2

That is good, But ... yes there a but I am sorry about that, never nice to bring bad news
In the dump man page, I reread this, you can backup a dev like /dev/hda1 if it is not mounted (in other words not used by applic and or users) This does not mean that it will not succeed to backup if it is mounted (used by applic and or users), BUT chance are that this is corrupted

I think what will happen is you will be able to restore but there will be some file that are corrupted , you may not see this immediately !

now about your question on how to restore the tape on the other system
As I say-ed before never try-ed that but a suppose the following because it seems logical, but try/test this !

Logically I thing you need a ext2 partition of the same or bigger size
let is say this partition is /dev/XXXX

# mt -xf /dev/st0 rewind
# restore -xf /dev/st0 /dev/XXXX

seems to me the way to go !

Once again I would be Cautious about the result of a dump 0 when user/applic are in use, and the same goes for a dump 0 of /dev/hdXX when that device/partition is mounted ! this is aking for trouble.


J-P
Smile I will feel the difference
Huc_1
Honored Contributor

Re: Boot disk under Redhat 5.2

Amit,

to create a boot disk ? I think what you mean is how do I mark a partion as bootable

#fdisk /dev/hda
a
1
w
q

if you type this in interactively you will create a boot flag on (option a) on the first (1) partion of /dev/hda the (option w is to write this to disk) and q is for quiting

Hope this helps

J-P
Smile I will feel the difference
Amit Dixit_2
Regular Advisor

Re: Boot disk under Redhat 5.2

Hi,
Pleae reply is this possible or not if
yes then how.

WANT TO BACK UP MY CURRENT SYSTEM
COMPLETE BACKUP USING DUMP AND THEN
RESTORE TO A DIFFERENT SYSTEM WITH
DIFFERENT DISK GEOMETRY.

MY CURRENT SYSTEM IS HAVING 2 DISK
HDA,HDB.

THE SYSTEM ON WHICH I WILL RESTORE IS
ALSO HAVING TWO DISK

with what option should i dump the system
to tape and then how to boot from rescue
disk having restore utility on it to
restore the system to the new hardware.

if anyone can just write the sequence of
commands,
i am using redhat 5.2 (Apollo) kernel
release is 2.0.36

Thanks,
Amit.


Huc_1
Honored Contributor

Re: Boot disk under Redhat 5.2

Once again YES ! and there are probably many way's you can find out about then by reading the doc on redhat site (I have already giving theses to you in one of my reply's, please read !)

The following is one of the many way.

"It is a META SCRIPT!" You as a system manager are suppose to be able to fill in the gaps !

shutdown system boot into single user mode
#mount
#mt -f /dev/st0 rewind
#dump -0f /dev/nst0 /

NOTE dump only works on ext2 file system!

Do this on all mount point you need a backup from (like ex: /usr /myapplic /ora1 ..etc)
to find out about theses have a look in cat /etc/fstab

depending on the lenght of you tape you may need to do this on two tapes (to find this out do a df -h and compare with the capacity of your tape )

when you have finished do a
# mt -f /dev/st0 rewind

(this is because you have used /dev/nst0) on your dump command.

so at the end of this you have "let say 2 rewinded tapes) with on 1 /,/usr,home and on the 2 /myapplic, /ora1, /ora2 ".

reboot system .

On the new system
boot from install cd in rescue mode (linux rescue) this will drop you in a shell as root

note to boot into rescue (you can also use floppys like tomsrt, or cd like knoppix do a search on the web here to find link to theses)

Put the first tape in tape drive.
now partition your disk using fdisk like
ex:

#fdisk /dev/hda
here you have to know what your doing if not (read man page and redhat doc)
ex: make the same partion size or bigger then what you find on you Old 5.2 system to see these with the command #fdisk -l)

do the same for /dev/hbb

To mark one partition as bootable please see my previous reply !

then make file system on you partitions ex:

#mkfs.ext2 /dev/hda1
do this for all partition (use old 5.2 system as reference)

mount the first partion (use the same order as is on tape ex; /, /usr, ...)
ex:

#mount /dev/hda1 /mnt
# cd /mnt
#restore -xf /dev/nst0

when done
#cd ..
umount /mnt

then procede to restore second mount point

#mount /dev/hda2 /mnt
# cd /mnt
#restore -xf /dev/nst0

do this for all mount point !

NOTE; dont get mixed-up do it in the same order as on tape !!never rewinding tape otherwise this can get confusing!)

do the same to the second tape and mount point !

when all done physicaly detach system from the lan then reboot ! (dont want to have to system with the same ip/name on youe lan)

Once the system is booted you will have to check for error THERE WILL be some you have different hardware and maybe you had minor restore issues correct these and change this system to an other IP address and IP name ... before putting it on the net.


Beware the above is just an untryed senario of how I would go about it, YOU are responsible for your action, but I belive the above with a few modification would work.

J-P (please forgive the use of UPPER case in the above reply, they are just there because I dont know how underline would show up )











Smile I will feel the difference
Huc_1
Honored Contributor

Re: Boot disk under Redhat 5.2

Rereading my meta scenario I see I have left out one issue ...

At a last stage and just before booting this new system do

#mount /dev/dha1 /mnt
#chroot /mnt
#lilo
#chroot /
#cd ..
then reboot

I think this is needed because the partition is marked as bootable but there is no information on this master boot block .... that is the offset to the root device is not there .

But as is said you will have a few small problems/issues.

J-P
Smile I will feel the difference
Amit Dixit_2
Regular Advisor

Re: Boot disk under Redhat 5.2

Hi,
I have created the boot+rescue disk now
how can i have the restore utility on it
to restore my data which i took using
DUMP command.

Thanks,
Amit.
Huc_1
Honored Contributor

Re: Boot disk under Redhat 5.2

Amit,
How did you create the boot/rescue is it (knoppix, RedHat 5.2 ... ?).

The reason I am asking is because normaly restore should be on it ?

I dont thing restore code has changed much so it should be alright to copy executable

The location is on most distributions
/sbin/restore

You can copy this using floppy net or net from you Redhat 5.2 if need be.

Just make a small restore test on a small dir to be sure it works well before trying big/huge dumps restore... if you get problem try and use the version that is on the system you dump from (to be sure the dump and the restore version match)


J-P

Smile I will feel the difference