Hi all devels,
I don't consider myself as a developer but, as I have written and
successfully tested at least _one_ shell script, I think I might loosely
fit on this category. :))
Now seriously: regarding JS's call on this thread,
http://www.redhat.com/archives/fedora-devel-list/2004-May/msg00901.html
and also JA's posting of a preliminary doc on this one,
http://www.redhat.com/archives/fedora-devel-list/2004-May/msg00908.html
I wish to offer a contribution to the theme, following a different path
from what's being explored till now. Note that some users might consider
it more troublesome and more involved, whereas some other users might
prefer it due to the additional security it offers.
I have been playing for a time with 'System Rescue CD' which is a live CD
with recovery tools, published at
http://sysresccd.org/ .
Using it a few times, and adding a shallow knowledge of shell scripts,
I've managed to build a set of scripts which work together and allow me to
make partition backups (ext3, vfat and ntfs have been tested) to another
HD or smb share (using partimage), plus backups of the MBR and partition
table using dd and sfdisk .
I've also successfully restored NTFS and VFAT partitions which these
scripts. In one case I purposely deleted the Windoze boot partition with
fdisk and then restored it with a partimage backup after manually
restoring the MBR and partition table.
Summing up all of this: if a doc is being cooked up to advise users on the
perils of dual booting, I suppose many users would be pleased to find on
this doc an additional and optional procedure like the following:
- back up MBR with dd (per script)
- back up partition table with sfdisk (per script)
- back up windows partition(s) using partimage (per script)
- install FC2 with all precautions
- confirm that FC2 boots
- see that Windoze boots and sigh in relief . . . OR
- see that Windoze does not boot and proceed
- back up FC2 partition(s) using partimage (per script)
- restore MBR with dd (manually, maybe . . .)
- restore partition table with sfdisk (manually, maybe . . .)
- see that Windoze now boots and sigh in relief . . . (at least
that's what's hoped at this point . . .)
- see that now FC2 does not boot and proceed
- if needed, destroy and recreate partitions for FC2 (manually
with parted - Partition Magic could also be mentioned as an optional tool)
- restore FC2 partition(s) using partimage (per script)
- see that FC2 boots and sigh in relief
- go do something more interesting
I haven't personally gone thru the whole procedure myself, but judging for
my experience with parts of it I have no reason to suspect it won't work.
Of course I might have missed something, but that would require someone
willing to go thru the whole shebang at once. It might take a few hours
(mostly for I/O on backup and restore operations), but the setup is
straightforward if shell scripts are used.
Maybe it will not be 'politically correct' to suggest third-party tools
such as 'System Rescue CD' to recover from a Fedora-specific problem.
However I'm suggesting this with a vision of broader 'Open Source' and
'community' concepts.
Thanx all for your attention.
Thiers

|
Hack the Windows NT/2000/XP Boot Loader
Customize what and how you boot using the BOOT.INI file. [Discuss (14) | Link to this hack] |
[boot loader]
timeout=3
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows
XP Professional"
/fastdetect
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows
XP Professional"
/fastdetect
multi(0)disk(0)rdisk(0)partition(2)\WINNT="Microsoft Windows 2000
Professional"
/fastdetect
Open a command prompt window through StartRun, type in CMD, and then click OK.
Change to the root directory of the boot disk and remove the attributes (System, Hidden, Read-only):
X:\Foo>C:
C:\Bar>cd \
C:\> attrib -s -h -r boot.ini
Open a command prompt window through StartRun, type in CMD, and then click OK.
Change to the root directory of the boot disk and restore the attributes:
X:\Foo>C:
C:\Bar>cd \
C:\> attrib +s +h +r boot.ini
Parameter | Description |
|---|---|
multi(0) | The drive controller number, typically 0. |
disk(0) | Always 0; not used with IDE drives |
|
rdisk(0) | The physical hard disk attached to drive controller. For ATA controllers, this number is typically between 0 and 3. For SCSI controllers, this number is typically between 0 and 7, or 0 and 15, depending on the adapter type. |
partition(0) | The partition number. |
Parameter | Description |
|---|---|
scsi(0) | The drive controller, typically 0. |
disk(0) | The SCSI disk drive device number, between 0 and 7, or 0 and 15, depending on the host adapter. |
rdisk(0) | The SCSI logical unit, typically 0. |
partition(0) | The partition number the operating system resides on. |
You can use this syntax to specify which SCSI disk to boot from by following these steps:
The unmodified BOOT.INI on both drives may initially read as follows:
[boot loader]
timeout=3
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP
Professional"
[boot loader]
timeout=3
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP on 1st Drive"
multi(0)disk(0)rdisk(1)partition(1)\WINNT="Microsoft Windows 2000 on 2nd Drive"
Then modify the BOOT.INI file on the second drive to look like:
[boot loader]
timeout=0
default=multi(0)disk(0)rdisk(1)partition(1)\WINNT
[operating systems]
multi(0)disk(0)rdisk(1)partition(1)\WINNT="Microsoft Windows 2000 on 2nd Drive"
This provides the operating system location reference for the operating system on the second drive.
TIP
# grub
GNU GRUB version 0.95 (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> root (hd0, <TAB>
Possible partitions are:
Partition num: 0, Filesystem type unknown, partition type 0x7
Partition num: 2, Filesystem type is fat, partition type 0xc
Partition num: 4, Filesystem type unknown, partition type 0x82
Partition num: 5, Filesystem type is ext2fs, partition type 0x83
grub> root (hd0,5)
Filesystem type is ext2fs, partition type 0x83
grub> setup (hd0,5)
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,5)"... failed (this is not fatal)
Running "embed /boot/grub/e2fs_stage1_5 (hd0,5)"... failed (this is not fatal)
Running "install /boot/grub/stage1 (hd0,5) /boot/grub/stage2 p /boot/grub/menu
.lst "... succeeded
Done.
grub> quit
TIP
After you set up the bootloader, you need to grab it and save it into a file with the dd command:
# dd if=/dev/hda6 of=grub.bin bs=512 count=1
c:\grub.bin="Linux"
Disconnect the first hard drive that contains Windows NT-2003.
Connect the drive you want to use for DOS-Me as the first/only hard drive.
Modify the BOOT.INI file on the second drive to look like:
[boot loader]
timeout=5
default=multi(0)disk(0)rdisk(1)partition(1)\WINNT
[operating systems]
multi(0)disk(0)rdisk(1)partition(1)\WINNT="Microsoft Windows 2000"
d:\="Windows 98"
Showing messages 1 through 13 of 13.