Hi everyone,
I tried to clone a QNX6 partition to another HD,
the source HD is 1 GB with 450 MB used
the destination HD is 520 MB.
Therefore, I couldn’t simply make/copy/paste an image.
So, I tried like in the good old QNX4 days, to clone the partition by
hand.
I look up on QDN and could only find QNX4 information,
there was no article on cloning a QNX6 partition.
Basically,
I did fdisk a created a QNY partition
then run dinit and ask for a bootable partition
I copy-pasted boot files
and tar c /boot/* | tar xv /dest/boot/
for all directories: /etc /usr /bin /home
put all the directory permissions.
I rebooted, the OS asked me if I want hda/ or hdb/
both worked perfectly.
I disconnected the source HD and put destination HD as master alone.
I rebooted nothing works !?
What’s wrong ?
I probably forgot something but I don’t know what exactly.
What exaclty is happening when it’s not working.
I would guess the partition isn’t made bootable or has no loader
No loader, bootable I dunno ?
As far as I remember I put the switch for bootable…
something like… dinit -b -h -R /dev/hd1t78
Does anybody can help me out, please!
Have a nice day!
Sincerely yours,
Fred.
I copy-pasted the man page for reference purposes…
fdisk - create QNX disk partition (QNX)
fdisk [-pzf] [-B loader] drive cmd [args]
Options:
-z Zero the partition table (interactive mode only)
-p Pause before starting
-B loader Use filename ‘loader’ as the primary loader for the device.
-8 Use 8G loader
-f Force boot loader to be written on demand, even if it is
impossible to save the old loader which had been on the disk.
Where:
drive is the name of the disk (e.g. /dev/fd1, /dev/hd0)
cmd is a mandatory command. Recognised commands are:
add [-f slot] part’n size Create a partition.
boot [part’n | slot] Make partition bootable.
loader Copy boot loader to disk.
show Display partition table.
query [FREE|TOTAL|part’n] Size in cylinders.
info Show mount info for raw
drive.
slot (partition slot) must be in the range 1 - 4. This is used to
reference a partition by its ‘slot’ in the partition table.
part’n (partition type) may be ‘t’ followed by a numerical partition
type, or an (all caps or all lower case) OS name. e.g.
t77 - QNX partition (t7, t8 or t9 for QNX2.xxx)
t1 - DOS partition (DOS also uses t4 & t6)
t5 - Extended partition (both QNX and DOS)
Recognised OS names are QNX, DOS and OS2.
size (partition size) is the size in cylinders (720) or megabytes (98m)
of the partition to be added. Size may also be specified as a
fraction of the disk size: ALL, HALF, THIRD, QUARTER, or TENTH.
Note: The Neutrino version of fdisk does not current support an
interactive mode.
======================================================================
dinit - disk initialization (QNX)
dinit [-bhpqr] [-B filename] [-l | -L label] [-m message] drive
Options:
-b Do not initialize the filesystem. Write the OS Loader (ONLY)
to disk (can be combined with -B, -m or -O).
-B filename Use 512 byte OS loader from this file instead of the standard
QNX OS loader. To write only the loader (and not wipe the
filesystem clean) you must also specify the -b option.
-d drive_num The BIOS drive number to put in disk header (default: 1)
This is required for booting from secondary hard drives.
-f bootfile Preload ‘.boot’ on the disk with the contents of the
specified boot file.
-h Disk is Hard (fixed).
-m message Message for ‘Alternate OS’ booting (’.’ terminated) (see -b).
-O Use old qnx boot loader. (see -b)
-8 Use int 13 extended loader for disks bigger than 8.4Gig
(see -b)
-p Pause before starting.
-q Quiet (do not report or question).
-r Write root block to disk for REBUILD (must run CHKFSYS after
this).
-R Create a /.diskroot file in the root directory.
-S size When used on a file grow it to this size. You may end the size
with k (kilo), m (mega) or g (giga).
-l label Volume label (not required).
-L label Write volume label (ONLY) to disk.
Where:
drive is the name of the disk (as: /dev/fd1, /dev/hd0t77, etc)
Note:
OS loader is in this case referring to the loader which actually
loads the OS. In the case of a partitioned hard drive, this is
the secondary loader residing on the first block of the partition.
On an unpartitioned hard drive or a floppy, this will be the primary
bootstrap loader.
To write the QNX bootstrap loader onto the first block of a partitioned
hard drive, use the fdisk utility.
======================================================================
Currently, the booting process gives the following:
Notice: TEXT means the TEXT is displayed in bold.
{ COMMENT } means COMMENT is a simply a comment not an actual
output…
Normal boot: (HD0 master only)
[ Display BIOS Info inside a square box ]
QNX Loader
Boot Partition 1
Press ESC for alternate OS…
Neutrino technology inside!!!
Processor #1: 486 (AMD 486 F4M10S4) speed=33
Can’t locate PNP bios (no error)
pci-bios: No BIOS present - status ffffffff - errno 14!
pci_server: No dll loaded!
Unable to access “/dev/pci” (2)
Press the space bar to input boot options…
Detected EIDE. Scanning for devices
This can take up to 30 seconds…
[8197] fs-pkg built: Sep 7 2000 16:00:23
FS-PKG: Open configuration [/etc/system/package/packages]
FS-PKG: Ready to handle requests
Enumeration error: Can’t locate PNP bios (no error)
Installing /dev/par port 378
file /.swapfile added as swap device
File /.swapfile successfully added as a swap device
Starting extra run commands
Starting NFS modules…(this may take a while)
Mounting home directory
Initializing random device
[…]
login:
password:
Failure boot: (HD1 master only)
[ Display BIOS Info inside a square box ]
{ Nothing is display, computer hangs }
{ QNX Loader message never show up ?!? }
Dual HD boot: (HD0 master, HD1 slave)
[ Display BIOS Info inside a square box ]
QNX Loader
Boot Partition 1
Press ESC for alternate OS…
Neutrino technology inside!!!
Processor #1: 486 (AMD 486 F4M10S4) speed=33
Can’t locate PNP bios (no error)
pci-bios: No BIOS present - status ffffffff - errno 14!
pci_server: No dll loaded!
Unable to access “/dev/pci” (2)
Press the space bar to input boot options…
Detected EIDE. Scanning for devices
This can take up to 30 seconds…
Unable to mount a qnx file system as /fs/hd1-qnx4-qnxbase.qfs
on /fs/hd1-qnx4/boot/fs/qnxbase.fs (corrupted file system detected)
You have more than one .diskroot file which wanbts to mount as /
1 /dev/hd0t79
2 /dev/hd1t78
Which one do you wish to mount ? 1
{ 1 or 2 doesn’t matter both give the same results }
[8197] fs-pkg built: Sep 7 2000 16:00:23
FS-PKG: Open configuration [/etc/system/package/packages]
FS-PKG: Ready to handle requests
Enumeration error: Can’t locate PNP bios (no error)
Installing /dev/par port 378
file /.swapfile added as swap device
File /.swapfile successfully added as a swap device
Starting extra run commands
Starting NFS modules…(this may take a while)
Mounting home directory
Initializing random device
[…]
login:
password:
Dual HD boot partition 2: (HD0 master, HD1 slave)
[ Display BIOS Info inside a square box ]
QNX Loader
Boot Partition 2
Error loading Operating System
The file system is corrupted ?!
but works with a nice QNX Loader how to fix this ?
The file is said to be “corrupted”, I tried several time fdisk/dinit
it always gives the same error. Is the disk broken ?
What is more strange then ever is that I had no format problem with DOS
and the file system works fine with “another QNX Loader” from the hd0
drive…
Weird. Any suggestions !?
Thanks for your help!
Sincerely,
Fred.