Move OpenBSD from one hd to another (different size)

Move OpenBSD from one hd to another (different size)

Post by Marc Balla » Sat, 11 May 2002 22:57:50



Hi,

I initially installed OpenBSD 3.0 on a 6 GB Seagate HD.  I let the
install use the whole disk (wd0).  I must say that I find the OpenBSD
way of partitioning a bit unusual.  I am used to moving partitions
around but this scheme really puzzles me.  BTW after trying a few tools
like (dd, PQMagic, Ghost), I finally found two excellent tools from
Acronis (Disk Admin and True Image) and they cost less than PQ tools.

After a few weeks of reliable proxying, I decided to turn my OpenBSD
router into a router + file server as it is up 24/7.  I copied (with
Acronis tool) the OpenBSD partition (the first primary partition, the
equivalent of hda1 in Linux) to a Maxtor 60 GB and added a new ext2fs
partition on hda2.  But I can't mount it and if I use fdisk to recompute
free space, my router does not boot.  One of the problems when I copy
the partition (using dd or Acronis) is that the lable is copied as well,
but the new drive has a different geometry...

As I am rather new to OpenBSD, I would like advice on how to efficiently
copy my partition.  FYI, there is one partition but several file systems
resulting in wd0a to wd0h.  I assume that the OpenBSD partition behaves
like an extended partition and its logical drives.

I would like not to have to reinstall OpenBSD as I am not sure of the
changes I did after the install and wouldn't like to lose any of them.

Last question, is Samba the best solution to add file server
capabilities to my OpenBSD machine, using an ext2fs partition ?  My
clients are Win2K and Linux machines.

TIA, Marc

 
 
 

Move OpenBSD from one hd to another (different size)

Post by Marc Balla » Sat, 11 May 2002 23:01:10


Also, how can I create a correct label for my Maxtor drive ?

> Hi,

> I initially installed OpenBSD 3.0 on a 6 GB Seagate HD.  I let the
> install use the whole disk (wd0).  I must say that I find the OpenBSD
> way of partitioning a bit unusual.  I am used to moving partitions
> around but this scheme really puzzles me.  BTW after trying a few tools
> like (dd, PQMagic, Ghost), I finally found two excellent tools from
> Acronis (Disk Admin and True Image) and they cost less than PQ tools.

> After a few weeks of reliable proxying, I decided to turn my OpenBSD
> router into a router + file server as it is up 24/7.  I copied (with
> Acronis tool) the OpenBSD partition (the first primary partition, the
> equivalent of hda1 in Linux) to a Maxtor 60 GB and added a new ext2fs
> partition on hda2.  But I can't mount it and if I use fdisk to recompute
> free space, my router does not boot.  One of the problems when I copy
> the partition (using dd or Acronis) is that the lable is copied as well,
> but the new drive has a different geometry...

> As I am rather new to OpenBSD, I would like advice on how to efficiently
> copy my partition.  FYI, there is one partition but several file systems
> resulting in wd0a to wd0h.  I assume that the OpenBSD partition behaves
> like an extended partition and its logical drives.

> I would like not to have to reinstall OpenBSD as I am not sure of the
> changes I did after the install and wouldn't like to lose any of them.

> Last question, is Samba the best solution to add file server
> capabilities to my OpenBSD machine, using an ext2fs partition ?  My
> clients are Win2K and Linux machines.

> TIA, Marc


 
 
 

Move OpenBSD from one hd to another (different size)

Post by Ted » Sun, 12 May 2002 02:05:13



> After a few weeks of reliable proxying, I decided to turn my OpenBSD
> router into a router + file server as it is up 24/7.  I copied (with
> Acronis tool) the OpenBSD partition (the first primary partition, the
> equivalent of hda1 in Linux) to a Maxtor 60 GB and added a new ext2fs
> partition on hda2.  But I can't mount it and if I use fdisk to recompute
> free space, my router does not boot.  One of the problems when I copy
> the partition (using dd or Acronis) is that the lable is copied as well,
> but the new drive has a different geometry...

Install both harddrives.  Boot from the normal one.  Run fdisk to create a
partition table with an A6 partition for OpenBSD, and other partitios as
you need.  Then run disklabel and edit that so it closely matches what you
have on the first HD.  See the dump manpage for creating a backup that you
can copy over.  Restore on the new harddrive.  Rerun installboot on the
new harddrive.  Should be good then.  dd won't work so well on drives of
different geometries.

Quote:> As I am rather new to OpenBSD, I would like advice on how to efficiently
> copy my partition.  FYI, there is one partition but several file systems
> resulting in wd0a to wd0h.  I assume that the OpenBSD partition behaves
> like an extended partition and its logical drives.

Kinda, but not entirely the same.

Quote:> Last question, is Samba the best solution to add file server
> capabilities to my OpenBSD machine, using an ext2fs partition ?  My
> clients are Win2K and Linux machines.

Possibly.  But there's no need for it to be an ext2fs partition.

--
If you ever would give them a helping hand,
You can be sure they'll chop off the arm.
Never, ever, never trust a Klingon; you will always regret it.

 
 
 

Move OpenBSD from one hd to another (different size)

Post by Marc Balla » Sun, 12 May 2002 02:26:08


Quote:> Install both harddrives.  Boot from the normal one.  Run fdisk to create a
> partition table with an A6 partition for OpenBSD, and other partitios as
> you need.  Then run disklabel and edit that so it closely matches what you
> have on the first HD.  See the dump manpage for creating a backup that you
> can copy over.  Restore on the new harddrive.  Rerun installboot on the
> new harddrive.  Should be good then.  dd won't work so well on drives of
> different geometries.

Will do and tell you.

Quote:> > Last question, is Samba the best solution to add file server
> > capabilities to my OpenBSD machine, using an ext2fs partition ?  My
> > clients are Win2K and Linux machines.

> Possibly.  But there's no need for it to be an ext2fs partition.

what is the native filesystem for OpenBSD ? ffs ?  Is it a journaling
file system ?
 
 
 

Move OpenBSD from one hd to another (different size)

Post by clvrmnk » Sun, 12 May 2002 02:58:36



> what is the native filesystem for OpenBSD ? ffs ?  Is it a journaling
> file system ?

 >

It's the FFS.  It is not journaling, and the rationale for this is
outlined in the following document:

http://www.usenix.org/publications/library/proceedings/usenix2000/gen...

It does have a feature called "soft updates" (also discussed in the
document) which, once enabled, increase performance while still
protecting meta-data.

-- cm

 
 
 

Move OpenBSD from one hd to another (different size)

Post by Ted » Sun, 12 May 2002 04:30:35



> what is the native filesystem for OpenBSD ? ffs ?  Is it a journaling
> file system ?

ffs.  see FAQ:
http://www.openbsd.org/faq/faq8.html#Journaling

--
If you ever would give them a helping hand,
You can be sure they'll chop off the arm.
Never, ever, never trust a Klingon; you will always regret it.

 
 
 

Move OpenBSD from one hd to another (different size)

Post by Marc Balla » Mon, 13 May 2002 04:09:50


dump -0ua -f /dev/wd1i /
newfs /dev/wd1a
mount /dev/wd1a /mnt/fs
cd /mnt/fs
restore rf /dev/wd1i
cd /
umount /mnt/fs

dump -0ua -f /dev/wd1i /tmp
newfs /dev/wd1d
mount /dev/wd1d /mnt/fs
cd /mnt/fs
restore rf /dev/wd1i
cd /
umount /mnt/fs

dump -0ua -f /dev/wd1i /var
newfs /dev/wd1e
mount /dev/wd1e /mnt/fs
cd /mnt/fs
restore rf /dev/wd1i
cd /
umount /mnt/fs

dump -0ua -f /dev/wd1i /usr
newfs /dev/wd1g
mount /dev/wd1g /mnt/fs
cd /mnt/fs
restore rf /dev/wd1i
cd /
umount /mnt/fs

dump -0ua -f /dev/wd1i /home
newfs /dev/wd1h
mount /dev/wd1h /mnt/fs
cd /mnt/fs
restore rf /dev/wd1i
cd /
umount /mnt/fs

newfs /dev/wd1i

did the job...  /dev/wd1i is my new partition.  However I have a problem
: I run installboot /boot /mcd/bootsomething wd1 and when I attempt to
boot I get the bad magic number message.  I assume it has to do with
drive geometry but how can I solve it ?



> > After a few weeks of reliable proxying, I decided to turn my OpenBSD
> > router into a router + file server as it is up 24/7.  I copied (with
> > Acronis tool) the OpenBSD partition (the first primary partition, the
> > equivalent of hda1 in Linux) to a Maxtor 60 GB and added a new ext2fs
> > partition on hda2.  But I can't mount it and if I use fdisk to recompute
> > free space, my router does not boot.  One of the problems when I copy
> > the partition (using dd or Acronis) is that the lable is copied as well,
> > but the new drive has a different geometry...

> Install both harddrives.  Boot from the normal one.  Run fdisk to create a
> partition table with an A6 partition for OpenBSD, and other partitios as
> you need.  Then run disklabel and edit that so it closely matches what you
> have on the first HD.  See the dump manpage for creating a backup that you
> can copy over.  Restore on the new harddrive.  Rerun installboot on the
> new harddrive.  Should be good then.  dd won't work so well on drives of
> different geometries.

> > As I am rather new to OpenBSD, I would like advice on how to efficiently
> > copy my partition.  FYI, there is one partition but several file systems
> > resulting in wd0a to wd0h.  I assume that the OpenBSD partition behaves
> > like an extended partition and its logical drives.

> Kinda, but not entirely the same.

> > Last question, is Samba the best solution to add file server
> > capabilities to my OpenBSD machine, using an ext2fs partition ?  My
> > clients are Win2K and Linux machines.

> Possibly.  But there's no need for it to be an ext2fs partition.

> --
> If you ever would give them a helping hand,
> You can be sure they'll chop off the arm.
> Never, ever, never trust a Klingon; you will always regret it.

 
 
 

Move OpenBSD from one hd to another (different size)

Post by Ted » Mon, 13 May 2002 05:41:24



> did the job...  /dev/wd1i is my new partition.  However I have a problem
> : I run installboot /boot /mcd/bootsomething wd1 and when I attempt to
> boot I get the bad magic number message.  I assume it has to do with
> drive geometry but how can I solve it ?

Two things.  Where are /boot and /bsd physically located?  The installboot
command you mention won't work unless wd1 is mounted as /.  It's probably
under /mnt, so it should be installboot /mnt/boot ....  See if that works.



> > > After a few weeks of reliable proxying, I decided to turn my OpenBSD
> > > router into a router + file server as it is up 24/7.  I copied (with
> > > Acronis tool) the OpenBSD partition (the first primary partition, the
> > > equivalent of hda1 in Linux) to a Maxtor 60 GB and added a new ext2fs
> > > partition on hda2.  But I can't mount it and if I use fdisk to recompute
> > > free space, my router does not boot.  One of the problems when I copy
> > > the partition (using dd or Acronis) is that the lable is copied as well,
> > > but the new drive has a different geometry...

> > Install both harddrives.  Boot from the normal one.  Run fdisk to create a
> > partition table with an A6 partition for OpenBSD, and other partitios as
> > you need.  Then run disklabel and edit that so it closely matches what you
> > have on the first HD.  See the dump manpage for creating a backup that you
> > can copy over.  Restore on the new harddrive.  Rerun installboot on the
> > new harddrive.  Should be good then.  dd won't work so well on drives of
> > different geometries.

> > > As I am rather new to OpenBSD, I would like advice on how to efficiently
> > > copy my partition.  FYI, there is one partition but several file systems
> > > resulting in wd0a to wd0h.  I assume that the OpenBSD partition behaves
> > > like an extended partition and its logical drives.

> > Kinda, but not entirely the same.

> > > Last question, is Samba the best solution to add file server
> > > capabilities to my OpenBSD machine, using an ext2fs partition ?  My
> > > clients are Win2K and Linux machines.

> > Possibly.  But there's no need for it to be an ext2fs partition.

> > --
> > If you ever would give them a helping hand,
> > You can be sure they'll chop off the arm.
> > Never, ever, never trust a Klingon; you will always regret it.

--
If you ever would give them a helping hand,
You can be sure they'll chop off the arm.
Never, ever, never trust a Klingon; you will always regret it.
 
 
 

Move OpenBSD from one hd to another (different size)

Post by Marc Balla » Tue, 14 May 2002 05:39:16


all ok, many thanks for your precious help Ted


> > did the job...  /dev/wd1i is my new partition.  However I have a problem
> > : I run installboot /boot /mcd/bootsomething wd1 and when I attempt to
> > boot I get the bad magic number message.  I assume it has to do with
> > drive geometry but how can I solve it ?

> Two things.  Where are /boot and /bsd physically located?  The installboot
> command you mention won't work unless wd1 is mounted as /.  It's probably
> under /mnt, so it should be installboot /mnt/boot ....  See if that works.



> > > > After a few weeks of reliable proxying, I decided to turn my OpenBSD
> > > > router into a router + file server as it is up 24/7.  I copied (with
> > > > Acronis tool) the OpenBSD partition (the first primary partition, the
> > > > equivalent of hda1 in Linux) to a Maxtor 60 GB and added a new ext2fs
> > > > partition on hda2.  But I can't mount it and if I use fdisk to recompute
> > > > free space, my router does not boot.  One of the problems when I copy
> > > > the partition (using dd or Acronis) is that the lable is copied as well,
> > > > but the new drive has a different geometry...

> > > Install both harddrives.  Boot from the normal one.  Run fdisk to create a
> > > partition table with an A6 partition for OpenBSD, and other partitios as
> > > you need.  Then run disklabel and edit that so it closely matches what you
> > > have on the first HD.  See the dump manpage for creating a backup that you
> > > can copy over.  Restore on the new harddrive.  Rerun installboot on the
> > > new harddrive.  Should be good then.  dd won't work so well on drives of
> > > different geometries.

> > > > As I am rather new to OpenBSD, I would like advice on how to efficiently
> > > > copy my partition.  FYI, there is one partition but several file systems
> > > > resulting in wd0a to wd0h.  I assume that the OpenBSD partition behaves
> > > > like an extended partition and its logical drives.

> > > Kinda, but not entirely the same.

> > > > Last question, is Samba the best solution to add file server
> > > > capabilities to my OpenBSD machine, using an ext2fs partition ?  My
> > > > clients are Win2K and Linux machines.

> > > Possibly.  But there's no need for it to be an ext2fs partition.

> > > --
> > > If you ever would give them a helping hand,
> > > You can be sure they'll chop off the arm.
> > > Never, ever, never trust a Klingon; you will always regret it.

> --
> If you ever would give them a helping hand,
> You can be sure they'll chop off the arm.
> Never, ever, never trust a Klingon; you will always regret it.

 
 
 

1. how to move linux from one HD to another HD?

Hello

My aim is to reconfigure my hardware without reinstalling the software. My
problem is, that I'm not well-experienced in moving any unix-related OS
from one harddisk to a different one. I think it's quite complicated
because of its tree-like file structure.
If I'm wrong and the whole thing is so simple, please give me a hint!

thanx a lot

Patrick

2. R50 to S7A migration

3. moving Linux, as a whole, from one HD to a new one

4. EQL problems

5. Moving Linux to a different HD : HOW?

6. umask question

7. Moving HD to different IDE channel. . .

8. RH 7.1 on laptop? HELP!

9. how to move linux from one hd to another

10. moving linux from one hd to another

11. Moving from one HD to another...

12. Moving Linux from one HD to other

13. Problem mounting SCSI HD in a different computer w/ different Adaptec Controller