Re: changing the postion of a partion in fdisk

2008-01-09 Thread Jerry McAllister
On Wed, Jan 09, 2008 at 11:00:04AM -0500, Jerry McAllister wrote:

 On Tue, Jan 08, 2008 at 10:01:34PM -0500, Aryeh M. Friedman wrote:
 
   On Mon, Jan 07, 2008 at 10:33:04PM -0500, Aryeh M. Friedman
   wrote:
  
   I have my FreeBSD partition as partition 1 and my ntfs as
   partition 2 but Vista insists that there is no suitable
   partion to install to (even though the ntfs partition is big
   enough)... after some research I found that vista absolutely
   insists that the ntfs partition be partition 1... how do I
   swap them and/or delete the ntfs one and renumber it so
   freebsd is in partion slot 2 (with nothing in 1 and then I
   can use fdisk to make a new slot 1)

   I think I should of been a little more specific the physical
   layout is completely correct (i.e. the sizes, start/end tracks,
   etc.) the only problem is the logical numbering of the
   partitions/slices in the mbr idea of the table... namely I just
   need to relabel them not modify them in any way.
  
   I don't think you can make slice 2 become slice 1.  The system
   numbers them in order of appearance.  This comes from BIOS standard
   usage.
  2 starts before 1 in my case?!??!
  
  % fdisk
  *** Working on device /dev/ad8 ***
  parameters extracted from in-core disklabel are:
  cylinders=969021 heads=16 sectors/track=63 (1008 blks/cyl)
  
  Figures below won't work with BIOS for partitions not in cyl 1
  parameters to be used for BIOS calculations are:
  cylinders=969021 heads=16 sectors/track=63 (1008 blks/cyl)
  
  Media sector size is 512
  Warning: BIOS sector numbering starts with sector 1
  Information from DOS bootblock is:
  The data for partition 1 is:
  sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
  start 62910540, size 913857525 (446219 Meg), flag 80 (active)
  beg: cyl 1023/ head 255/ sector 63;
  end: cyl 1023/ head 254/ sector 63
  The data for partition 2 is:
  sysid 7 (0x07),(OS/2 HPFS, NTFS, QNX-2 (16 bit) or Advanced UNIX)
  start 63, size 62910477 (30718 Meg), flag 80 (active)
  beg: cyl 0/ head 1/ sector 1;
  end: cyl 1023/ head 254/ sector 63
  The data for partition 3 is:
  UNUSED
  The data for partition 4 is:
  UNUSED
  
  2
 
 Interesting.   I have never seen that before.
 
 jerry

And, given this, you might try doing an fdisk to recreate those slices 
with the location specs that you want - that is create slice 2 with
starting point and size using the beginning values and slice 1 with
starting address and size following that.  I am not sure the fdisk 
would work at all that way, but it might.

Also, I wouldn't guarantee that the current contents of those slices would 
still be usable.  They might.   Doing an fdisk only modifies the slice 
table and not any of the data or even the partition tables for the slices 
which are written by bsdlabel.  So, it might leave it intact. 

But, if you are up to experimenting, you might learn something.
If you have a good backup of what you need to preserve, then the
worse that could happen is you would have to start over from scratch
and reinstall both Vista and FreeBSD.  At that point, it becomes moot
because you can put things where you want.

jerry

 
  - --
  Aryeh M. Friedman
  FloSoft Systems, Java Developer Tools
  http://www.flosoft-systems.com
  Developer, not business, friendly.
  -BEGIN PGP SIGNATURE-
  Version: GnuPG v2.0.4 (FreeBSD)
  Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
  
  iD8DBQFHhDkOjRvRjGmHRgQRAr09AJ0TCHS+emo0rp0/UBNtHKE8CxxlBQCfTz3g
  AFWyXr9pArXzfBsGvfRFgUQ=
  =HZJJ
  -END PGP SIGNATURE-
  
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: changing the postion of a partion in fdisk

2008-01-09 Thread Dick Hoogendijk
On 09 Jan Jerry McAllister wrote:
 On Tue, Jan 08, 2008 at 10:01:34PM -0500, Aryeh M. Friedman wrote:
   I don't think you can make slice 2 become slice 1.  The system
   numbers them in order of appearance.  This comes from BIOS
   standard usage.
  2 starts before 1 in my case?!??!

I know for sure that linux fdisk gives a warning about the disk
partitions not being in the right physical order. You can change the
order under expert options and write it back to disk.
Partition magick is know to switch numbers on disk. Other OS's like
linux but also solaris see it and offer to change it back.
I'm not sure about fbsd's fdisk. Too long ago. If not, try one of those
knoppix live CD's

-- 
Dick Hoogendijk -- PGP/GnuPG key: 01D2433D
++ http://nagual.nl/ | Solaris 10 / XDE ++
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: changing the postion of a partion in fdisk

2008-01-08 Thread John Nielsen

Quoting Aryeh M. Friedman [EMAIL PROTECTED]:


I have my FreeBSD partition as partition 1 and my ntfs as partition 2
but Vista insists that there is no suitable partion to install to
(even though the ntfs partition is big enough)... after some research
I found that vista absolutely insists that the ntfs partition be
partition 1... how do I swap them and/or delete the ntfs one and
renumber it so freebsd is in partion slot 2 (with nothing in 1 and
then I can use fdisk to make a new slot 1)


You can probably just use FreeBSD's fdisk to swap them. Something along 
the lines of:


1) Verify your backups
2) Boot from a FreeBSD Rescue CD and enter the fixit shell
3) Type fdisk /dev/yourdisk. I'll assume ad0 from this point.
4) Write down the output. All of it. Keep a copy in a safe place (this 
is actually good practice even if you're _not_ intentionally messing 
with your partitions). If you're feeling clever and/or lazy you could 
of course bring up a line printer or a network interface and print the 
output or copy it to another machine (from which you should then print 
it), but a file on the local disk will not serve (and a file on the 
mfsroot will go away as soon as you reboot or if anything unexpected 
happens, which it usually does).
5) Type fdisk -u /dev/ad0 (or whatever your disk is). Manually enter 
the numbers (including explicitly setting the start/end sector, etc) 
for partition 2 as partition 1 and vice versa. Think about which 
partition you want to mark as active (probably 2, see step 10) and do 
so. Verify your changes against your printout, then commit them.
6) Type ls /dev/ad0* and verify that you see the devices you expect 
(including your FreeBSD partitions, probably something like ad0s2[a-d]).
7) Mount your root partition, e.g. mount /dev/ad0s2a /mnt. If it 
doesn't mount then abort. Run fdisk again and change the values back to 
what they were initially.
8) Edit your fstab to update the slice numbers. e.g. vi 
/mnt/etc/fstab or sed -e s/ad0s1/ad0s2/g  /mnt/etc/fstab  
/mnt/etc/fstab.new followed by a sanity check and a couple mv commands.

9) Unmount your root partition, e.g. umount /mnt.
10) Reboot and verify that your FreeBSD installation is still alive.
11) Carry on...

This information comes with no warranty. :)

JN

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: changing the postion of a partion in fdisk

2008-01-08 Thread Jerry McAllister
On Mon, Jan 07, 2008 at 10:33:04PM -0500, Aryeh M. Friedman wrote:

 
 I have my FreeBSD partition as partition 1 and my ntfs as partition 2
 but Vista insists that there is no suitable partion to install to
 (even though the ntfs partition is big enough)... after some research
 I found that vista absolutely insists that the ntfs partition be
 partition 1... how do I swap them and/or delete the ntfs one and
 renumber it so freebsd is in partion slot 2 (with nothing in 1 and
 then I can use fdisk to make a new slot 1)

Well, you can use fdisk from the fixit shell to make your slice 2 (note 
the primary divisions are called 'slices' in FreeBSD) in to a FreeBSD 
type and then create your FreeBSD partitions in it and build FreeBSD 
filesystems there.

Then, still using the fixit, use dump/restore to copy the contents of
the FreeBSD filesystems over.
  Assuming the major slices are ad0s1 and ad0s2, then something like:
  mkdir /oldroot
  mount /ad0s1a /oldroot
  mkdir /newroot
  mount /ad0s2a /newroot
  cd /newroot
  dump 0af - / | restore -rf -

That will get the root partition/filesystem.
Do appropriately similar for the rest of the FreeBSD filesystems.

Note that while in fixit, the running root (/) is in a memory
filesystem which will go away after you reboot.  So, those
mount points you create (oldroot, newroot, etc) are temporary.

Then use a utility such as gparted (freely downloadable as ISO)
to convert the #1 slice into NTFS and install Vista there.
You might be able to get FreeBSD's fdisk to do the convesion to
NTFS, but I have never tried that.  You would have to know the
code number for it.

jerry

 
 - --
 Aryeh M. Friedman
 FloSoft Systems, Java Developer Tools
 http://www.flosoft-systems.com
 Developer, not business, friendly.
 
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: changing the postion of a partion in fdisk

2008-01-08 Thread Aryeh M. Friedman
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jerry McAllister wrote:
 On Mon, Jan 07, 2008 at 10:33:04PM -0500, Aryeh M. Friedman wrote:

 I have my FreeBSD partition as partition 1 and my ntfs as
 partition 2 but Vista insists that there is no suitable partion
 to install to (even though the ntfs partition is big enough)...
 after some research I found that vista absolutely insists that
 the ntfs partition be partition 1... how do I swap them and/or
 delete the ntfs one and renumber it so freebsd is in partion slot
 2 (with nothing in 1 and then I can use fdisk to make a new slot
 1)

 Well, you can use fdisk from the fixit shell to make your slice 2
 (note the primary divisions are called 'slices' in FreeBSD) in to a
 FreeBSD type and then create your FreeBSD partitions in it and
 build FreeBSD filesystems there.

I think I should of been a little more specific the physical layout is
completely correct (i.e. the sizes, start/end tracks, etc.) the only
problem is the logical numbering of the partitions/slices in the mbr
idea of the table... namely I just need to relabel them not modify
them in any way.

 Then, still using the fixit, use dump/restore to copy the contents
 of the FreeBSD filesystems over. Assuming the major slices are
 ad0s1 and ad0s2, then something like: mkdir /oldroot mount /ad0s1a
 /oldroot mkdir /newroot mount /ad0s2a /newroot cd /newroot dump 0af
 - / | restore -rf -

 That will get the root partition/filesystem. Do appropriately
 similar for the rest of the FreeBSD filesystems.

 Note that while in fixit, the running root (/) is in a memory
 filesystem which will go away after you reboot.  So, those mount
 points you create (oldroot, newroot, etc) are temporary.

 Then use a utility such as gparted (freely downloadable as ISO) to
 convert the #1 slice into NTFS and install Vista there. You might
 be able to get FreeBSD's fdisk to do the convesion to NTFS, but I
 have never tried that.  You would have to know the code number for
 it.

 jerry

 - -- Aryeh M. Friedman FloSoft Systems, Java Developer Tools
 http://www.flosoft-systems.com Developer, not business, friendly.


 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions To
 unsubscribe, send any mail to
 [EMAIL PROTECTED]



- --
Aryeh M. Friedman
FloSoft Systems, Java Developer Tools
http://www.flosoft-systems.com
Developer, not business, friendly.
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.4 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHg/RPjRvRjGmHRgQRAmAIAJ9ez7kulB5P94ZeVUsY7rrnDo3hLwCgjNCW
m54xx08yDK3m7lXN5/xsQ84=
=+9FU
-END PGP SIGNATURE-

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: changing the postion of a partion in fdisk

2008-01-08 Thread Jerry McAllister
On Tue, Jan 08, 2008 at 05:08:15PM -0500, Aryeh M. Friedman wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Jerry McAllister wrote:
  On Mon, Jan 07, 2008 at 10:33:04PM -0500, Aryeh M. Friedman wrote:
 
  I have my FreeBSD partition as partition 1 and my ntfs as
  partition 2 but Vista insists that there is no suitable partion
  to install to (even though the ntfs partition is big enough)...
  after some research I found that vista absolutely insists that
  the ntfs partition be partition 1... how do I swap them and/or
  delete the ntfs one and renumber it so freebsd is in partion slot
  2 (with nothing in 1 and then I can use fdisk to make a new slot
  1)
 
  Well, you can use fdisk from the fixit shell to make your slice 2
  (note the primary divisions are called 'slices' in FreeBSD) in to a
  FreeBSD type and then create your FreeBSD partitions in it and
  build FreeBSD filesystems there.
 
 I think I should of been a little more specific the physical layout is
 completely correct (i.e. the sizes, start/end tracks, etc.) the only
 problem is the logical numbering of the partitions/slices in the mbr
 idea of the table... namely I just need to relabel them not modify
 them in any way.

I don't think you can make slice 2 become slice 1.  The system numbers 
them in order of appearance.  This comes from BIOS standard usage.

jerry

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: changing the postion of a partion in fdisk

2008-01-08 Thread Aryeh M. Friedman
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jerry McAllister wrote:
 On Tue, Jan 08, 2008 at 05:08:15PM -0500, Aryeh M. Friedman wrote:

 -BEGIN PGP SIGNED MESSAGE- Hash: SHA1

 Jerry McAllister wrote:
 On Mon, Jan 07, 2008 at 10:33:04PM -0500, Aryeh M. Friedman
 wrote:

 I have my FreeBSD partition as partition 1 and my ntfs as
 partition 2 but Vista insists that there is no suitable
 partion to install to (even though the ntfs partition is big
 enough)... after some research I found that vista absolutely
 insists that the ntfs partition be partition 1... how do I
 swap them and/or delete the ntfs one and renumber it so
 freebsd is in partion slot 2 (with nothing in 1 and then I
 can use fdisk to make a new slot 1)
 Well, you can use fdisk from the fixit shell to make your slice
 2 (note the primary divisions are called 'slices' in FreeBSD)
 in to a FreeBSD type and then create your FreeBSD partitions in
 it and build FreeBSD filesystems there.
 I think I should of been a little more specific the physical
 layout is completely correct (i.e. the sizes, start/end tracks,
 etc.) the only problem is the logical numbering of the
 partitions/slices in the mbr idea of the table... namely I just
 need to relabel them not modify them in any way.

 I don't think you can make slice 2 become slice 1.  The system
 numbers them in order of appearance.  This comes from BIOS standard
 usage.
2 starts before 1 in my case?!??!

% fdisk
*** Working on device /dev/ad8 ***
parameters extracted from in-core disklabel are:
cylinders=969021 heads=16 sectors/track=63 (1008 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=969021 heads=16 sectors/track=63 (1008 blks/cyl)

Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 62910540, size 913857525 (446219 Meg), flag 80 (active)
beg: cyl 1023/ head 255/ sector 63;
end: cyl 1023/ head 254/ sector 63
The data for partition 2 is:
sysid 7 (0x07),(OS/2 HPFS, NTFS, QNX-2 (16 bit) or Advanced UNIX)
start 63, size 62910477 (30718 Meg), flag 80 (active)
beg: cyl 0/ head 1/ sector 1;
end: cyl 1023/ head 254/ sector 63
The data for partition 3 is:
UNUSED
The data for partition 4 is:
UNUSED

2

- --
Aryeh M. Friedman
FloSoft Systems, Java Developer Tools
http://www.flosoft-systems.com
Developer, not business, friendly.
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.4 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHhDkOjRvRjGmHRgQRAr09AJ0TCHS+emo0rp0/UBNtHKE8CxxlBQCfTz3g
AFWyXr9pArXzfBsGvfRFgUQ=
=HZJJ
-END PGP SIGNATURE-

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


changing the postion of a partion in fdisk

2008-01-07 Thread Aryeh M. Friedman
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I have my FreeBSD partition as partition 1 and my ntfs as partition 2
but Vista insists that there is no suitable partion to install to
(even though the ntfs partition is big enough)... after some research
I found that vista absolutely insists that the ntfs partition be
partition 1... how do I swap them and/or delete the ntfs one and
renumber it so freebsd is in partion slot 2 (with nothing in 1 and
then I can use fdisk to make a new slot 1)

- --
Aryeh M. Friedman
FloSoft Systems, Java Developer Tools
http://www.flosoft-systems.com
Developer, not business, friendly.
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.4 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHgu7wjRvRjGmHRgQRArSwAKCVAwIOK+D++dk22OTht+flBjhEtQCcC6oS
lRchYlAYgb/6zn34iw2FoHQ=
=DEp0
-END PGP SIGNATURE-

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]