Copying (workable) partitions under QNX6.1.0

Hi,

I am at a point where I need to copy my (working, mostly) QNX6.1.0
partition to another partition (bigger, much) in order to “expand” my
partition.

The approach I am taking is as follows:

  1. Create the new partition of type 77 (The old one is type 79)
  2. Reboot the system so that the enumerator sees the new partition (even
    though it sees it as corrupt)
  3. dinit the partition (with a ./diskroot file)
  4. Re-boot the system again - picking the “old” partition when asked
  5. slay fs-pkg (so I don’t get all those circular and “virtual” file
    structures - after all what I want is essentially a ‘clone’ of my current
    partition.
  6. run cp -r / to /fs/hd0-qnx4
    ( I had to find cp in the “real” file structure first…:sunglasses:

Is this a workable approach, and will it work correctly, or will I have
things like symbolic links and other things messed up?

Regards, and TIA


Stephen Munnings
Software Developer
Corman Technologies Inc.

On Wed, 11 Jul 2001 15:41:44 -0400, Stephen Munnings
<steve@cormantech.com> wrote:

There was a discussion on “cloning” with
cp /dev/hd0 /dev/hd1 (<2GB) or dd if=/dev/hd0 of=/dev/hd1
and another one on “GHOST” with scripts by Paul Russell.
Search comp.os.qnx for the terms enclosed in quotation marks.

ako

Hi,

I am at a point where I need to copy my (working, mostly) QNX6.1.0
partition to another partition (bigger, much) in order to “expand” my
partition.

The approach I am taking is as follows:

  1. Create the new partition of type 77 (The old one is type 79)
  2. Reboot the system so that the enumerator sees the new partition (even
    though it sees it as corrupt)
  3. dinit the partition (with a ./diskroot file)
  4. Re-boot the system again - picking the “old” partition when asked
  5. slay fs-pkg (so I don’t get all those circular and “virtual” file
    structures - after all what I want is essentially a ‘clone’ of my current
    partition.
  6. run cp -r / to /fs/hd0-qnx4
    ( I had to find cp in the “real” file structure first…> :sunglasses:

Is this a workable approach, and will it work correctly, or will I have
things like symbolic links and other things messed up?

Regards, and TIA


Stephen Munnings
Software Developer
Corman Technologies Inc.

In article <3b504d56.2299501@inn.qnx.com>, ako@box43.gnet.pl says…

On Wed, 11 Jul 2001 15:41:44 -0400, Stephen Munnings
steve@cormantech.com> > wrote:

There was a discussion on “cloning” with
cp /dev/hd0 /dev/hd1 (<2GB) or dd if=/dev/hd0 of=/dev/hd1
and another one on “GHOST” with scripts by Paul Russell.
Search comp.os.qnx for the terms enclosed in quotation marks.

That is a discussion on “cloning” - i.e. one does NOT expand the size of
the partition when one does that…
I want/need to expand the size of the partition as well!
I have done as I indicated, and it appears to have worked.
I am worried about hidden “gotchas” that will show up just as soon as I
make the old partition available for other uses!

ako

Hi,

I am at a point where I need to copy my (working, mostly) QNX6.1.0
partition to another partition (bigger, much) in order to “expand” my
partition.

The approach I am taking is as follows:

  1. Create the new partition of type 77 (The old one is type 79)
  2. Reboot the system so that the enumerator sees the new partition (even
    though it sees it as corrupt)
  3. dinit the partition (with a ./diskroot file)
  4. Re-boot the system again - picking the “old” partition when asked
  5. slay fs-pkg (so I don’t get all those circular and “virtual” file
    structures - after all what I want is essentially a ‘clone’ of my current
    partition.
  6. run cp -r / to /fs/hd0-qnx4
    ( I had to find cp in the “real” file structure first…> :sunglasses:

Is this a workable approach, and will it work correctly, or will I have
things like symbolic links and other things messed up?

Regards, and TIA


Stephen Munnings
Software Developer
Corman Technologies Inc.


Stephen Munnings
Software Developer
Corman Technologies Inc.

On Mon, 16 Jul 2001 09:46:01 -0400, Stephen Munnings
<steve@cormantech.com> wrote:

In article <> 3b504d56.2299501@inn.qnx.com> >, > ako@box43.gnet.pl > says…
On Wed, 11 Jul 2001 15:41:44 -0400, Stephen Munnings
steve@cormantech.com> > wrote:

There was a discussion on “cloning” with
cp /dev/hd0 /dev/hd1 (<2GB) or dd if=/dev/hd0 of=/dev/hd1
and another one on “GHOST” with scripts by Paul Russell.
Search comp.os.qnx for the terms enclosed in quotation marks.


That is a discussion on “cloning” - i.e. one does NOT expand the size of
the partition when one does that…
I want/need to expand the size of the partition as well!
I have done as I indicated, and it appears to have worked.
I am worried about hidden “gotchas” that will show up just as soon as I
make the old partition available for other uses!

More promising threads (“installing to a new partition”,

“native install…”, “.qfs files” - on .installation, “moving on to
another HDD”, “expanding the virtual filesystem” - on .newuser, "QNX6

  • System Backup" involving… Stephen Munnings - on .os), with
    interesting variations (the use of shmem, the -D parameter), but none
    seem to provide a definitive answer…

Is rebooting still necessary in 6.1 to see a new partition?

ako

Hi,

I am at a point where I need to copy my (working, mostly) QNX6.1.0
partition to another partition (bigger, much) in order to “expand” my
partition.

The approach I am taking is as follows:

  1. Create the new partition of type 77 (The old one is type 79)
  2. Reboot the system so that the enumerator sees the new partition (even
    though it sees it as corrupt)
  3. dinit the partition (with a ./diskroot file)
  4. Re-boot the system again - picking the “old” partition when asked
  5. slay fs-pkg (so I don’t get all those circular and “virtual” file
    structures - after all what I want is essentially a ‘clone’ of my current
    partition.
  6. run cp -r / to /fs/hd0-qnx4
    ( I had to find cp in the “real” file structure first…> :sunglasses:

Is this a workable approach, and will it work correctly, or will I have
things like symbolic links and other things messed up?

Regards, and TIA


Stephen Munnings
Software Developer
Corman Technologies Inc.


\

Stephen Munnings
Software Developer
Corman Technologies Inc.

Andrzej Kocon <ako@box43.gnet.pl> wrote:
: Is rebooting still necessary in 6.1 to see a new partition?

No, “mount -e /dev/hd0” …

In article <MPG.15b675f8e3f80d1f989695@inn.qnx.com>, steve@cormantech.com
says…

Hi,

I am at a point where I need to copy my (working, mostly) QNX6.1.0
partition to another partition (bigger, much) in order to “expand” my
partition.

The approach I am taking is as follows:

  1. Create the new partition of type 77 (The old one is type 79)
  2. Reboot the system so that the enumerator sees the new partition (even
    though it sees it as corrupt)
  3. dinit the partition (with a ./diskroot file)
  4. Re-boot the system again - picking the “old” partition when asked
  5. slay fs-pkg (so I don’t get all those circular and “virtual” file
    structures - after all what I want is essentially a ‘clone’ of my current
    partition.
  6. run cp -r / to /fs/hd0-qnx4
    ( I had to find cp in the “real” file structure first…> :sunglasses:

Is this a workable approach, and will it work correctly, or will I have
things like symbolic links and other things messed up?

Regards, and TIA


So…

Nobody at QSSL is willing to confirm or deny that this is a workable
approach?
No gotcha’s??

Assent by silence?


Stephen Munnings
Software Developer
Corman Technologies Inc.

Stephen Munnings <steve@cormantech.com> wrote:

In article <> MPG.15b675f8e3f80d1f989695@inn.qnx.com> >, > steve@cormantech.com
says…
Hi,

I am at a point where I need to copy my (working, mostly) QNX6.1.0
partition to another partition (bigger, much) in order to “expand” my
partition.

The approach I am taking is as follows:

  1. Create the new partition of type 77 (The old one is type 79)
  2. Reboot the system so that the enumerator sees the new partition (even
    though it sees it as corrupt)
  3. dinit the partition (with a ./diskroot file)
  4. Re-boot the system again - picking the “old” partition when asked
  5. slay fs-pkg (so I don’t get all those circular and “virtual” file
    structures - after all what I want is essentially a ‘clone’ of my current
    partition.
  6. run cp -r / to /fs/hd0-qnx4
    ( I had to find cp in the “real” file structure first…> :sunglasses:

Is this a workable approach, and will it work correctly, or will I have
things like symbolic links and other things messed up?

Regards, and TIA


So…
Nobody at QSSL is willing to confirm or deny that this is a workable
approach?
No gotcha’s??

Assent by silence?

Well I don’t know if that would hold up in court or not, but
I’ll provide you with my thoughts in any case =;-)

Your steps above seem to be sane for the most part. My
personal preference in these matters is to take a whole
partition as “personal space” and use that for /home
and then leave all of the “system” things on the other
partition, this includes the packages. This also makes
some maintenance chores a little bit easier.

The things that you might want to do is to cp your shell
utilities to /dev/shmem before you slay fs-pkg so that
they are easier to find. In fact you could also copy
over the packages (/pkgs) directly to the new partition
first before copying any of the other data. Then installing
a prefix will allow you to map things over with a
restart of the package filesystem.

Of course perhaps the easiest thing to do would be just
to create a boot floppy with only devb-eide, a shell and
some assorted utilities. Mount your two partitions and
do a direct copy without even running any of the other
“things” in the system.

Here is a boot image that I typically use when I’m network
booting here:

Modify this to your liking

#[search=/usr/nto/x86/sbin:/usr/nto/x86/usr/sbin:/usr/nto/x86/bin:/usr/nto/x86/usr/bin:/usr/nto/x86/lib:/usr/nto/x86/lib/dll:/usr/nto/x86/boot/sys:/usr/nto/x86/boot/build:/usr/nto/x86/boot/sys]

[virtual=x86,bios +compress] boot = {
startup-bios -v -N thomasf3
PATH=/proc/boot:/bin LD_LIBRARY_PATH=/proc/boot:/dev/shmem:/lib:/dll procnto
}

[+script] startup-script = {
DL_DEBUG=1
SYSNAME=nto
PROCESSOR=x86

LD_LIBRARY_PATH=/proc/boot:/dev/shmem:/lib:/dll
PATH=/proc/boot:/bin

devc-con -n8
waitfor /dev/con1
reopen /dev/con1

display_msg Starting pipe server
pipe
waitfor /dev/pipe

#Start devb-eide and have it
display_msg Starting devb-eide
devb-eide
waitfor /dev/hd0

[+session pri=10r] esh &
reopen /dev/con2
[+session pri=10r] esh &
reopen /dev/con3
[+session pri=10r] esh &
reopen /dev/con4
[+session pri=10r] esh &
reopen /dev/con5
[+session pri=20r] esh &
}

[type=link] /dev/console=/dev/con1

[type=link] /tmp=/dev/shmem
[type=link] /bin/sh=/proc/boot/esh

An excessive amount of loading going on here!

#[type=link] /usr/lib/ldqnx.so.1=/lib/libc.so.1
[type=link] /usr/lib/ldqnx.so.1=/proc/boot/libc.so.2
[type=link] /usr/lib/ldqnx.so.2=/proc/boot/libc.so.2
[type=link] /usr/lib/ldqnx.so=/proc/boot/libc.so.2

libcam.so.2
io-blk.so
cam-disk.so
cam-cdrom.so
fs-qnx4.so
#fs-cd.so
#fs-dos.so

[data=c]
devc-con
devb-eide
seedres
pci-bios
ls
cp
esh
less
pipe
mount
pidin

\

You might also consider taking a look at the “rescue” disk image
that I put together a while ago.

http://staff.qnx.com/~thomasf/nto.html


Thomas (toe-mah) Fletcher QNX Software Systems
thomasf@qnx.com Neutrino Development Group
(613)-591-0931 http://www.qnx.com/~thomasf