Re: gpart weirdness: diskid/DISK-3EV0P4PZ00007250010X GPT (17G)
On Wed, Oct 9, 2013, at 4:33, Anton Shterenlikht wrote: # gpart show = 34 35566411 da1 GPT (17G) 34 35566411 - free - (17G) = 34 35566411 diskid/DISK-3EV0P4PZ7250010X GPT (17G) 34 35566411- free - (17G) = 34 35566411 da2 GPT (17G) 34 35566411 - free - (17G) = 34 35566411 diskid/DISK-3EV0PWCX72500ZNJ GPT (17G) 34 35566411- free - (17G) # This is normal. Gpart is showing you both the physical dev versions of the devices and the GPT label versions of the devices. I'll admit it can be confusing, though. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: gpart weirdness: diskid/DISK-3EV0P4PZ00007250010X GPT (17G)
From: Mark Felder f...@freebsd.org To: freebsd-questions@freebsd.org Subject: Re: gpart weirdness: diskid/DISK-3EV0P4PZ7250010X GPT (17G) Date: Wed, 09 Oct 2013 06:56:17 -0500 On Wed, Oct 9, 2013, at 4:33, Anton Shterenlikht wrote: # gpart show = 34 35566411 da1 GPT (17G) 34 35566411 - free - (17G) = 34 35566411 diskid/DISK-3EV0P4PZ7250010X GPT (17G) 34 35566411- free - (17G) = 34 35566411 da2 GPT (17G) 34 35566411 - free - (17G) = 34 35566411 diskid/DISK-3EV0PWCX72500ZNJ GPT (17G) 34 35566411- free - (17G) # This is normal. Gpart is showing you both the physical dev versions of the devices and the GPT label versions of the devices. I'll admit it can be confusing, though. Well, I haven't seen this before. And it only shows this for some disks, not all: # gpart show = 34 143374671 da0 GPT (68G) 34 4096001 efi (200M) 409634 1429650712 freebsd-ufs (68G) = 34 35566411 da1 GPT (17G) 34 35566411 - free - (17G) = 34 35566411 da2 GPT (17G) 34 35566411 - free - (17G) = 34 142255508 da3 GPT (67G) 34 1422555081 freebsd-ufs (67G) = 34 35566411 diskid/DISK-3EV0P4PZ7250010X GPT (17G) 34 35566411- free - (17G) = 34 35566411 diskid/DISK-3EV0PWCX72500ZNJ GPT (17G) 34 35566411- free - (17G) = 34 142255508 da4 GPT (67G) 34 1422555081 freebsd-swap (67G) = 34 142255508 da5 GPT (67G) 34 1422555081 freebsd-ufs (67G) = 34 286744118 da6 GPT (136G) 34 2867441181 freebsd-ufs (136G) # Thanks Anton ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: gpart: table 'da0' is corrupt; operation not permitted
On Tue, Jul 16, 2013 at 1:44 PM, aurfalien aurfal...@gmail.com wrote: Upon doing; gpart destroy da0 I get; gpart: Device busy crude but effective: DISK=da0 offset=`diskinfo $DISK | awk '{ print $4 - 131072 }'` dd if=/dev/zero of=/dev/$DISK bs=64k count=1 dd if=/dev/zero of=/dev/$DISK bs=64k seek=$offset gpart create -s gpt ${DISK} ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: gpart: table 'da0' is corrupt; operation not permitted
On Jul 16, 2013, at 1:50 PM, Michael Sierchio wrote: On Tue, Jul 16, 2013 at 1:44 PM, aurfalien aurfal...@gmail.com wrote: Upon doing; gpart destroy da0 I get; gpart: Device busy crude but effective: DISK=da0 offset=`diskinfo $DISK | awk '{ print $4 - 131072 }'` dd if=/dev/zero of=/dev/$DISK bs=64k count=1 dd if=/dev/zero of=/dev/$DISK bs=64k seek=$offset gpart create -s gpt ${DISK} This is what I ended up doing. I unplugged it, waited a few, re plugged and then I was able to delete/destroy. I will keep your method on hand though as I prefer not doing a hot plug. - aurf ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: gpart: table 'da0' is corrupt; operation not permitted
On Tue, 16 Jul 2013, aurfalien wrote: On Jul 16, 2013, at 1:50 PM, Michael Sierchio wrote: On Tue, Jul 16, 2013 at 1:44 PM, aurfalien aurfal...@gmail.com wrote: Upon doing; gpart destroy da0 I get; gpart: Device busy crude but effective: DISK=da0 offset=`diskinfo $DISK | awk '{ print $4 - 131072 }'` dd if=/dev/zero of=/dev/$DISK bs=64k count=1 dd if=/dev/zero of=/dev/$DISK bs=64k seek=$offset gpart create -s gpt ${DISK} This is what I ended up doing. I unplugged it, waited a few, re plugged and then I was able to delete/destroy. I will keep your method on hand though as I prefer not doing a hot plug. Hot plug? That just wipes the beginning and end of the disk. I would erase 1M just to be sure. The more elegant version is gpart destroy -F da0 If it gives an error when doing that, disabling the safety may be necessary: sysctl kern.geom.debugflags=16 Do that only when necessary. It usually is not. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: gpart: table 'da0' is corrupt; operation not permitted
On Jul 16, 2013, at 3:01 PM, Warren Block wrote: On Tue, 16 Jul 2013, aurfalien wrote: On Jul 16, 2013, at 1:50 PM, Michael Sierchio wrote: On Tue, Jul 16, 2013 at 1:44 PM, aurfalien aurfal...@gmail.com wrote: Upon doing; gpart destroy da0 I get; gpart: Device busy crude but effective: DISK=da0 offset=`diskinfo $DISK | awk '{ print $4 - 131072 }'` dd if=/dev/zero of=/dev/$DISK bs=64k count=1 dd if=/dev/zero of=/dev/$DISK bs=64k seek=$offset gpart create -s gpt ${DISK} This is what I ended up doing. I unplugged it, waited a few, re plugged and then I was able to delete/destroy. I will keep your method on hand though as I prefer not doing a hot plug. Hot plug? That just wipes the beginning and end of the disk. I would erase 1M just to be sure. The more elegant version is gpart destroy -F da0 Oh for sure, I did that after the hotplug which finally allowed me to f do it. I had to hot plug a few times though. If it gives an error when doing that, disabling the safety may be necessary: sysctl kern.geom.debugflags=16 Do that only when necessary. It usually is not. Funny, I did that based on some googling but no dice. I booted in both regular shel and Live CD. - aurf ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: gpart
Hi, On Sun, 31 Mar 2013 21:06:24 -0500 Joshua Isom jri...@gmail.com wrote: On 3/31/2013 8:54 PM, Erich Dollansky wrote: I have had only one problem with this description. I could not boot from a GPT setup on my machine done as described there. But I have a disk done with PCBSD based on 9.0 which booted well. I cannot tell you if this is a problem caused by a later chance on the side of FreeBSD. Did you make sure to install the gpt bootloader instead of the standard bootloader? I believe I have the gptzfsboot, so I have no UFS partitions and everything's partitioned with GPT. There's no guarantee it will fix it, bios quirks happens. it is a real weird thing. As I installed a PCBSD on that disk originally, I have had a running system. It stopped working after some FreeBSD update. As this is an external disk, I do not boot often from it. I use it mainly for backup purpose. I stopped working on this problem for some time but I will have to go back soon after other work is finished. Erich ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
RE: gpart
-Original Message- From: Erich Dollansky [mailto:erichsfreebsdl...@alogt.com] Sent: March-31-13 9:55 PM To: Grant Peel Cc: freebsd-questions@freebsd.org Subject: Re: gpart Hi, On Sun, 31 Mar 2013 21:28:40 -0400 Grant Peel gp...@thenetnow.com wrote: I am in the midst of setting up the framework for new servers using FreeBSD 9.1. I used the bsdinstall and Manual`` option when setting up the disk geometry using GPT - graphical setup. The idea will be to eventually dump the 4 file systems, (/, /usr /var and /home) and restore them on other servers when the time comes. using a separated home is a very good idea. http://www.wonkity.com/~wblock/docs/html/disksetup.html I have had only one problem with this description. I could not boot from a GPT setup on my machine done as described there. But I have a disk done with PCBSD based on 9.0 which booted well. I cannot tell you if this is a problem caused by a later chance on the side of FreeBSD. Which worked well. But as yet I do not have dumps to test with. If all worked well for you, I do not see any problems coming for you then. I was wondering in anyone sees any issues creating the drive geometry using this method, with the intent of restoring dumped filesystems to to, including the root filesystem. I have some drives which partitioning I did according to this. The only problem I have is booting. The rest is all working perfectly. I am yet to use 9.1 to do so, so any tips would be appreciated. If you want this for serious servers, you might even consider 8.3, if your hardware is supported. Nothing beats the robustness of the older FreeBSD versions. Erich Interesting. Up to this point I have always upgraded to the latest release version of FreeBSD. I am currently running 8.0 and am in need of many of the ports to be upgraded, and have never had much luck doing the upgrade thing with the base system and ports, preferring instead to completely rebuild in restore user data. Can I assume that the versions of the ports shown on the freebsd.orgéports site will be available in 8.3 and 9.1é -G ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: gpart
Hi, On Mon, 1 Apr 2013 09:20:21 -0400 Grant Peel gp...@thenetnow.com wrote: I am currently running 8.0 and am in need of many of the ports to be upgraded, and have never had much luck doing the upgrade thing with the base system and ports, preferring instead to completely rebuild in restore user data. I do upgrades via portupgrade since 6.x days. Can I assume that the versions of the ports shown on the freebsd.orgéports site will be available in 8.3 and 9.1é Ports do not use a version. So, what ever FreeBSD version you have does not matter. If you updated your ports tree, you will always get the current port version. erich ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: gpart
Hi, On Sun, 31 Mar 2013 21:28:40 -0400 Grant Peel gp...@thenetnow.com wrote: I am in the midst of setting up the framework for new servers using FreeBSD 9.1. I used the bsdinstall and Manual`` option when setting up the disk geometry using GPT - graphical setup. The idea will be to eventually dump the 4 file systems, (/, /usr /var and /home) and restore them on other servers when the time comes. using a separated home is a very good idea. http://www.wonkity.com/~wblock/docs/html/disksetup.html I have had only one problem with this description. I could not boot from a GPT setup on my machine done as described there. But I have a disk done with PCBSD based on 9.0 which booted well. I cannot tell you if this is a problem caused by a later chance on the side of FreeBSD. Which worked well. But as yet I do not have dumps to test with. If all worked well for you, I do not see any problems coming for you then. I was wondering in anyone sees any issues creating the drive geometry using this method, with the intent of restoring dumped filesystems to to, including the root filesystem. I have some drives which partitioning I did according to this. The only problem I have is booting. The rest is all working perfectly. I am yet to use 9.1 to do so, so any tips would be appreciated. If you want this for serious servers, you might even consider 8.3, if your hardware is supported. Nothing beats the robustness of the older FreeBSD versions. Erich ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: gpart
On 3/31/2013 8:54 PM, Erich Dollansky wrote: I have had only one problem with this description. I could not boot from a GPT setup on my machine done as described there. But I have a disk done with PCBSD based on 9.0 which booted well. I cannot tell you if this is a problem caused by a later chance on the side of FreeBSD. Did you make sure to install the gpt bootloader instead of the standard bootloader? I believe I have the gptzfsboot, so I have no UFS partitions and everything's partitioned with GPT. There's no guarantee it will fix it, bios quirks happens. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: gpart
On 3/31/2013 8:28 PM, Grant Peel wrote: I was wondering in anyone sees any issues creating the drive geometry using this method, with the intent of restoring dumped filesystems to to, including the root filesystem. Geometry or partition size? If it's geometry, and you need to worry about it, buy a new system. Nowadays it's making sure your 4k block hard drive has everything aligned to 4k blocks when the drive reports 512b blocks. If it's partition size, no. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: gpart
On 31 March 2013, at 18:28, Grant Peel gp...@thenetnow.com wrote: Hi all, I am in the midst of setting up the framework for new servers using FreeBSD 9.1. I used the bsdinstall and Manual`` option when setting up the disk geometry using GPT - graphical setup. The idea will be to eventually dump the 4 file systems, (/, /usr /var and /home) and restore them on other servers when the time comes. I am reading everything there is about GPT at this point as I have never used it before. It seems gpart is the tool to use. I have done several test runs setting the drive geometry using this as a guide: http://www.wonkity.com/~wblock/docs/html/disksetup.html Which worked well. But as yet I do not have dumps to test with. I was wondering in anyone sees any issues creating the drive geometry using this method, with the intent of restoring dumped filesystems to to, including the root filesystem. I am yet to use 9.1 to do so, so any tips would be appreciated. I just finished doing exactly that. Worked fine. I installed 9.1 on a drive and it had boot problems. Apparently the drive was previously a part of a raid and graid would get involved during boot and wait and wait and wait. To get rid of that, I formatted another drive using gpart and then used dump-restore to move the data from the first drive to the second. The new drive is now the master drive for the system. The original drive has been returned to a spare drive pool. The new drive boots fine and just works. I did a complete zero of the drive before starting the partitioning though as I have no way of knowing if that drive was previously in a raid array. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: gpart, glabel and newfs -- what am I doing wrong
Hi, On Sun, 13 Jan 2013 01:36:21 -0500 kpn...@pobox.com wrote: On Sun, Jan 13, 2013 at 08:09:00AM +0700, Erich Dollansky wrote: For what is glabel then still good? It is still useful for partition schemes that don't have labels (eg, MBR) AND the filesystem used doesn't support labels itself AND the end of the partition does not get touched by the filesystem. Note that UFS in FreeBSD does support labels. I believe it is the '-L' option to newfs. ZFS does not in this sense, and ZFS touches the end of the partition. That's a long list of conditions. So, really, glabel should typically be avoided. thanks for the explaination. I am not able to use the labels outside gpart but if they work for me - as it currently looks like - I will stick with them. I will later report in more detail when I have finished my scripts. Erich ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: gpart, glabel and newfs -- what am I doing wrong
On Sun, 13 Jan 2013, kpn...@pobox.com wrote: On Sun, Jan 13, 2013 at 08:09:00AM +0700, Erich Dollansky wrote: For what is glabel then still good? It is still useful for partition schemes that don't have labels (eg, MBR) AND the filesystem used doesn't support labels itself AND the end of the partition does not get touched by the filesystem. But it doesn't matter what the filesystem does. Access to the last block is not allowed by the label device. The filesystem does not even see it. See my reply in -fs: http://lists.freebsd.org/pipermail/freebsd-fs/2013-January/016113.html ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: gpart, glabel and newfs -- what am I doing wrong
On Sun, 13 Jan 2013, Warren Block wrote: On Sun, 13 Jan 2013, kpn...@pobox.com wrote: On Sun, Jan 13, 2013 at 08:09:00AM +0700, Erich Dollansky wrote: For what is glabel then still good? It is still useful for partition schemes that don't have labels (eg, MBR) AND the filesystem used doesn't support labels itself AND the end of the partition does not get touched by the filesystem. But it doesn't matter what the filesystem does. Access to the last block is not allowed by the label device. The filesystem does not even see it. See my reply in -fs: http://lists.freebsd.org/pipermail/freebsd-fs/2013-January/016113.html Sorry, forgot to mention that one possible use for glabel is to label a swap partition on an MBR drive. # glabel label myswap /dev/ada0s1b And then in /etc/fstab: /dev/label/myswap noneswapsw 0 0 One block is used for metadata at the end of ada0s1b, but it's safe from overwriting because /dev/label/myswap does not include that block. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: gpart, glabel and newfs -- what am I doing wrong
FWIW I could not partition using the FreeBSD 9.0 amd64 install DVD. I partitioned with the PcBSD 8.2 DVD and then tried to install from 9.0, but it anyway caused partitioning issues. After that I partitioned using FreeBSD 8.3, installed 8.3 and then updated to 9.1. Regards, Ralf ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: gpart, glabel and newfs -- what am I doing wrong
On Sat, 12 Jan 2013, Erich Dollansky wrote: in general, I try to create the partitions with gpart, add a label with glabel and put a filesystem. I think that I am doing something very simple the wrong way but I cannot see the error. I try to do it in the following way: # gpart destroy -F da0 # gpart create -s GPT da0 # gpart add -t freebsd-boot -s 64k da0 # gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 da0 # gpart add -t freebsd-ufs -s 512m -a 4k -l Toshiba16GB2boot da0 # gpart add -t freebsd-ufs -s 10m -a 4k -l Toshiba16GB2root da0 # gpart add -t freebsd-swap -s 10m -a 4k -l Toshiba16GB2swap da0 # gpart add -t freebsd-ufs -s 10m -a 4k -l Toshiba16GB2var da0 # gpart add -t freebsd-ufs -s 10m -a 4k -l Toshiba16GB2tmp da0 # gpart add -t freebsd-ufs -a 4k -l Toshiba16GB2usr da0 Label the partitions: # glabel label Toshiba16GB2boot /dev/da0p2 # glabel label Toshiba16GB2root /dev/da0p3 # glabel label Toshiba16GB2swap /dev/da0p4 # glabel label Toshiba16GB2var /dev/da0p5 # glabel label Toshiba16GB2tmp /dev/da0p6 # glabel label Toshiba16GB2usr /dev/da0p7 There is no need for all this. You already created GPT labels with 'gpt -l' above. And those labels don't need extra metadata at the end of the partition. And put a file system onto the partitions. # newfs /dev/label/Toshiba16GB2boo # newfs /dev/label/Toshiba16GB2roo # newfs /dev/label/Toshiba16GB2var # newfs /dev/label/Toshiba16GB2tmp # newfs /dev/label/Toshiba16GB2usr Those look cut off. And there's surely a limit to the length of label names, but I'm not sure what it is. Anyway, use # newfs /dev/gpt/Toshiba16GB2boot And consider using -U with newfs. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: gpart, glabel and newfs -- what am I doing wrong
Hi, On Sat, 12 Jan 2013 09:56:39 -0700 (MST) Warren Block wbl...@wonkity.com wrote: On Sat, 12 Jan 2013, Erich Dollansky wrote: in general, I try to create the partitions with gpart, add a label with glabel and put a filesystem. I think that I am doing something very simple the wrong way but I cannot see the error. I try to do it in the following way: # gpart destroy -F da0 # gpart create -s GPT da0 # gpart add -t freebsd-boot -s 64k da0 # gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 da0 # gpart add -t freebsd-ufs -s 512m -a 4k -l Toshiba16GB2boot da0 # gpart add -t freebsd-ufs -s 10m -a 4k -l Toshiba16GB2root da0 # gpart add -t freebsd-swap -s 10m -a 4k -l Toshiba16GB2swap da0 # gpart add -t freebsd-ufs -s 10m -a 4k -l Toshiba16GB2var da0 # gpart add -t freebsd-ufs -s 10m -a 4k -l Toshiba16GB2tmp da0 # gpart add -t freebsd-ufs -a 4k -l Toshiba16GB2usr da0 Label the partitions: # glabel label Toshiba16GB2boot /dev/da0p2 # glabel label Toshiba16GB2root /dev/da0p3 # glabel label Toshiba16GB2swap /dev/da0p4 # glabel label Toshiba16GB2var /dev/da0p5 # glabel label Toshiba16GB2tmp /dev/da0p6 # glabel label Toshiba16GB2usr /dev/da0p7 There is no need for all this. You already created GPT labels with 'gpt -l' above. And those labels don't need extra metadata at the end of the partition. For what is glabel then still good? And consider using -U with newfs. Do not worry, this was just for the test. Erich ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: gpart and FreeBSD 8.x
On 12/03/2012 13:31, Rick Miller wrote: For anyone interested, Posted a new blog with regards to gpart on FreeBSD 8.x (with a link to one of Warren's blog posts): http://blog.hostileadmin.com/2012/12/03/freebsd-partitions-and-filesystems-with-gpart/ gpart is in BASE on 8.x so there is nothing to install -- No trees were killed in the creation of this message. However, many electrons were terribly inconvenienced. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: gpart and FreeBSD 8.x
On Mon, Dec 3, 2012 at 7:49 AM, Julien Cigar jci...@ulb.ac.be wrote: gpart is in BASE on 8.x so there is nothing to install Thanks, Julien! I added a comment to this effect on the post! -- Take care Rick Miller ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: gpart and mbr give no operating system message at boot.
On Fri, 7 Sep 2012, markham breitbach wrote: I am trying to partition a disk to be used as the primary boot disk for a FreeBSD 8.3 installation using gpart to install an MBR partition. The system is an existing FreeBSD 5.2.1 system at a remote location (ie impossible to boot from CD/netboot/etc), but has no data of value. To do this I am copying /boot and mfsroot.gz from an mfsbsd iso image to boot to an MFS live system so I can wipe the drive and do a clean install of 8.3. After booting to the MFS I do this: dd if=/dev/zero of=/dev/ad2 bs=1m count=1 gpart create -s mbr ad2 gpart add -b63 -t freebsd ad2 gpart create -s bsd ad2s1 gpart add -i1 -s 1g -t freebsd-ufs ad2s1 gpart add -i2 -s 1g -t freebsd-swap ad2s1 gpart add -i4 -s 2g -t freebsd-ufs ad2s1 gpart add -i5 -s 1g -t freebsd-ufs ad2s1 gpart add -i6 -t freebsd-ufs ad2s1 gpart set -a active -i 1 ad2 gpart bootcode -b /boot/mbr ad2 newfs /dev/ad2s1a newfs -U /dev/ad2s1d newfs -U /dev/ad2s1e newfs -U /dev/ad2s1f followed by a sysinstall and some configuration. When I reboot I get a message that says Operating system not found and the system hangs. If I follow the same procedure but create a gpt partition it works swimmingly. I am OK with using a gpt partition if needed, but for the sake of curiosity I would like to know why I can't make the MBR partition partition work. Am I missing something? Need to install bootcode to the slice also: # gpart bootcode -b /boot/boot ad2s1 Why are you skipping partition 3? For that matter, don't give partition numbers when adding, and gpart will just use the next available. If GPT works, there is little reason to use MBR. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: gpart and mbr give no operating system message at boot.
Thanks Warren! I was always under the impression that partition 3 was not to be touched as the raw partition, so figured it was best left alone. I was mostly concerned with installing MBR so it would still be compatible with sysinstall, although I can't really think of a terribly good reason not to go GPT. Installing the bootcode gets me a step closer, but is now puking at the loader. I'm not sure if this is because the bootcode is coming from and 8.1 install, but at this point I'm pretty much out of time and out of patience for this, since it is something of a bandaid situation anyway. On 12-09-07 2:48 PM, Warren Block wrote: On Fri, 7 Sep 2012, markham breitbach wrote: I am trying to partition a disk to be used as the primary boot disk for a FreeBSD 8.3 installation using gpart to install an MBR partition. The system is an existing FreeBSD 5.2.1 system at a remote location (ie impossible to boot from CD/netboot/etc), but has no data of value. To do this I am copying /boot and mfsroot.gz from an mfsbsd iso image to boot to an MFS live system so I can wipe the drive and do a clean install of 8.3. After booting to the MFS I do this: dd if=/dev/zero of=/dev/ad2 bs=1m count=1 gpart create -s mbr ad2 gpart add -b63 -t freebsd ad2 gpart create -s bsd ad2s1 gpart add -i1 -s 1g -t freebsd-ufs ad2s1 gpart add -i2 -s 1g -t freebsd-swap ad2s1 gpart add -i4 -s 2g -t freebsd-ufs ad2s1 gpart add -i5 -s 1g -t freebsd-ufs ad2s1 gpart add -i6 -t freebsd-ufs ad2s1 gpart set -a active -i 1 ad2 gpart bootcode -b /boot/mbr ad2 newfs /dev/ad2s1a newfs -U /dev/ad2s1d newfs -U /dev/ad2s1e newfs -U /dev/ad2s1f followed by a sysinstall and some configuration. When I reboot I get a message that says Operating system not found and the system hangs. If I follow the same procedure but create a gpt partition it works swimmingly. I am OK with using a gpt partition if needed, but for the sake of curiosity I would like to know why I can't make the MBR partition partition work. Am I missing something? Need to install bootcode to the slice also: # gpart bootcode -b /boot/boot ad2s1 Why are you skipping partition 3? For that matter, don't give partition numbers when adding, and gpart will just use the next available. If GPT works, there is little reason to use MBR. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: gpart and mbr give no operating system message at boot.
On Fri, 07 Sep 2012 17:00:24 -0600, markham breitbach wrote: I was always under the impression that partition 3 was not to be touched as the raw partition, so figured it was best left alone. No, that is regarding traditional partitioning. But it's not the 3rd partition, it's the 'c' partition, which means nothing more or less than the whole device or the whole slice. In today's FreeBSD /dev representation, the 'c' is left out, e. g. /dev/ad0c = /dev/ad0, and /dev/da3s2c = /dev/da3s2. For GPT partitions, that doesn't matter. It's only relevant for the kind of partitions disklabel (bsdlabel) creates inside a slice or directly on the device. Reserved names (or those with special purpose) are 'a' for a bootable partition, 'b' for a swap partition and 'c' for the whole slice or disk. I think even 'd' has had a special meaning, but I didn't encounter it yet, even though I'm using FreeBSD since 4.0. :-) Partitions created with the gpart / gpt tools usually use e. g. /dev/ad0p1 and so on for partitioning, if I remember correctly. Additionally, I typically point to http://www.wonkity.com/~wblock/docs/html/disksetup.html to encourage the use of labels, because that lets you leave devices names alone. More information can be found here: http://www.daemonforums.org/showthread.php?t=2666 http://www.freebsdonline.com/content/view/731/506/ http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/disks.html And also http://www.freebsd.org/doc/handbook/geom-glabel.html regarding labels (GEOM labels, UFS labels, UFSIDs). I was mostly concerned with installing MBR so it would still be compatible with sysinstall, although I can't really think of a terribly good reason not to go GPT. Maybe that is significant only on older hardware where you intendedly want to preserve the traditional approach of MBR partitioning, maybe to keep compatibility with other systems that have trouble with GPT layouts. Installing the bootcode gets me a step closer, but is now puking at the loader. I'm not sure if this is because the bootcode is coming from and 8.1 install, but at this point I'm pretty much out of time and out of patience for this, since it is something of a bandaid situation anyway. The version number should not be the problem. It's only important that the boot elements installed refer to the layout that is present on disk correctly. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: gpart usage during install
Robert Simmons wrote: I'm just installing a 9.0-RELEASE instance in Virtual Box to check things out. I ran into something odd. With 8.x I install certain things into a geli encrypted partition. To do this I have to use a fixit shell and a manual install. Now, I'm trying to do the same thing in 9.0, but when I get to the partitioning stage of the install, and I select the option to setup the partitions in a shell, I get the following error from gpart. What has changed? What am I doing wrong? # gpart create -s GPT ad0 gpart: arg0 'ad0': Invalid argument 9 is using the new ATA_CAM layer now, so your drive will look like: ada0 instead of the old ad0. -Mike ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: gpart, modified label does not show up in /dev/gpt.
Peter schreef: Hello all. I just installed FreeBSD 9.0 RC2 and upgraded to 9.0 RC3. I used the standard GPT disk layout at install. Now i want to set labels for my disk, so that i can swap around disks a little more easy. So reading through the man page it told me to use gpart modify -i -l The layout is as follows: test# gpart status Name Status Components da0p1 OK da0 da0p2 OK da0 da0p3 OK da0 test# gpart list | grep label label: (null) label: (null) label: (null) Now i modified the gpart labels. test# gpart modify -i1 -l bootpart da0 da0p1 modified test# gpart modify -i2 -l rootpart da0 da0p2 modified test# gpart modify -i3 -l swap da0 da0p3 modified Ok all looks fine. Now lets see if i can use my labels test# cd /dev/gpt /dev/gpt: No such file or directory. Well it does not create my labels I did check if the labels where there test# gpart list | grep label label: bootpart label: rootpart label: swap So i rebooted the machine! But after a reboot, still no /dev/gpt. So why is it not creating my labels! Am i missing a step? Thanks for your time. And before i forget, merry christmas to all, and a wonderful 2012. regards, Johan Hendriks I was going to say if you mount /dev/da0p? its /dev/gpt/label disappears, and since all the partition are mounted already [/dev/gpt/ is empty], then /dev/gpt is maybe also removed...but /dev/gpt/bootpart is not mounted and should still show up. When you ran the 'gpart' commands, did you set the sysctl geom debug variable? [sysctl kern.geom.debugflags=17] After the reboot, are the labels still there? [gpart list | grep label] ]Peter[ I placed some other disk in (for the zfs pool) Now i have /dev/gpt/bootpart, but not the labels for swap and / I did not use the sysctl value. And yes the labels are stil in place. test# cd /dev/gpt test# ls -al total 1 dr-xr-xr-x 2 root wheel 512 Dec 23 20:02 . dr-xr-xr-x 10 root wheel 512 Dec 23 21:02 .. crw-r- 1 root operator0, 123 Dec 23 20:02 bootpart test# gpart list | grep label label: bootpart label: rootpart label: swap test# I will try the debugflag option. But it should not be nessacary i guess. thanks regards Johan ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: gpart, modified label does not show up in /dev/gpt.
Hello all. I just installed FreeBSD 9.0 RC2 and upgraded to 9.0 RC3. I used the standard GPT disk layout at install. Now i want to set labels for my disk, so that i can swap around disks a little more easy. So reading through the man page it told me to use gpart modify -i -l The layout is as follows: test# gpart status Name Status Components da0p1 OK da0 da0p2 OK da0 da0p3 OK da0 test# gpart list | grep label label: (null) label: (null) label: (null) Now i modified the gpart labels. test# gpart modify -i1 -l bootpart da0 da0p1 modified test# gpart modify -i2 -l rootpart da0 da0p2 modified test# gpart modify -i3 -l swap da0 da0p3 modified Ok all looks fine. Now lets see if i can use my labels test# cd /dev/gpt /dev/gpt: No such file or directory. Well it does not create my labels I did check if the labels where there test# gpart list | grep label label: bootpart label: rootpart label: swap So i rebooted the machine! But after a reboot, still no /dev/gpt. So why is it not creating my labels! Am i missing a step? Thanks for your time. And before i forget, merry christmas to all, and a wonderful 2012. regards, Johan Hendriks I was going to say if you mount /dev/da0p? its /dev/gpt/label disappears, and since all the partition are mounted already [/dev/gpt/ is empty], then /dev/gpt is maybe also removed...but /dev/gpt/bootpart is not mounted and should still show up. When you ran the 'gpart' commands, did you set the sysctl geom debug variable? [sysctl kern.geom.debugflags=17] After the reboot, are the labels still there? [gpart list | grep label] ]Peter[ ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: gpart, modified label does not show up in /dev/gpt.
Peter schreef: Hello all. I just installed FreeBSD 9.0 RC2 and upgraded to 9.0 RC3. I used the standard GPT disk layout at install. Now i want to set labels for my disk, so that i can swap around disks a little more easy. So reading through the man page it told me to use gpart modify -i -l The layout is as follows: test# gpart status Name Status Components da0p1 OK da0 da0p2 OK da0 da0p3 OK da0 test# gpart list | grep label label: (null) label: (null) label: (null) Now i modified the gpart labels. test# gpart modify -i1 -l bootpart da0 da0p1 modified test# gpart modify -i2 -l rootpart da0 da0p2 modified test# gpart modify -i3 -l swap da0 da0p3 modified Ok all looks fine. Now lets see if i can use my labels test# cd /dev/gpt /dev/gpt: No such file or directory. Well it does not create my labels I did check if the labels where there test# gpart list | grep label label: bootpart label: rootpart label: swap So i rebooted the machine! But after a reboot, still no /dev/gpt. So why is it not creating my labels! Am i missing a step? Thanks for your time. And before i forget, merry christmas to all, and a wonderful 2012. regards, Johan Hendriks I was going to say if you mount /dev/da0p? its /dev/gpt/label disappears, and since all the partition are mounted already [/dev/gpt/ is empty], then /dev/gpt is maybe also removed...but /dev/gpt/bootpart is not mounted and should still show up. When you ran the 'gpart' commands, did you set the sysctl geom debug variable? [sysctl kern.geom.debugflags=17] After the reboot, are the labels still there? [gpart list | grep label] ]Peter[ I placed some other disk in (for the zfs pool) Now i have /dev/gpt/bootpart, but not the labels for swap and / I did not use the sysctl value. And yes the labels are stil in place. test# cd /dev/gpt test# ls -al total 1 dr-xr-xr-x 2 root wheel 512 Dec 23 20:02 . dr-xr-xr-x 10 root wheel 512 Dec 23 21:02 .. crw-r- 1 root operator0, 123 Dec 23 20:02 bootpart test# gpart list | grep label label: bootpart label: rootpart label: swap test# I will try the debugflag option. But it should not be nessacary i guess. thanks regards Johan If you have already mounted a /dev/da0p?, its label is removed from /dev/gpt - 'bootpart' is never mounted, that is why it's label remains. you just have to change /etc/fstab to the /dev/gpt/labels and then they will remain and get mounted - Or boot from a DVD, don't mount anything and you'll see the labels. ie: If you mount '/dev/da0p2'as '/' then '/dev/gpt/rootpart' will no longer be available, same goes for swap and everything else. If you mount 'dev/gpt/rootpart' as '/', the you'll have both '/dev/da0p2' and '/dev/gpt/bootpart' ]Peter[ ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: gpart, modified label does not show up in /dev/gpt.
Peter schreef: Peter schreef: Hello all. I just installed FreeBSD 9.0 RC2 and upgraded to 9.0 RC3. I used the standard GPT disk layout at install. Now i want to set labels for my disk, so that i can swap around disks a little more easy. So reading through the man page it told me to use gpart modify -i -l The layout is as follows: test# gpart status Name Status Components da0p1 OK da0 da0p2 OK da0 da0p3 OK da0 test# gpart list | grep label label: (null) label: (null) label: (null) Now i modified the gpart labels. test# gpart modify -i1 -l bootpart da0 da0p1 modified test# gpart modify -i2 -l rootpart da0 da0p2 modified test# gpart modify -i3 -l swap da0 da0p3 modified Ok all looks fine. Now lets see if i can use my labels test# cd /dev/gpt /dev/gpt: No such file or directory. Well it does not create my labels I did check if the labels where there test# gpart list | grep label label: bootpart label: rootpart label: swap So i rebooted the machine! But after a reboot, still no /dev/gpt. So why is it not creating my labels! Am i missing a step? Thanks for your time. And before i forget, merry christmas to all, and a wonderful 2012. regards, Johan Hendriks I was going to say if you mount /dev/da0p? its /dev/gpt/label disappears, and since all the partition are mounted already [/dev/gpt/ is empty], then /dev/gpt is maybe also removed...but /dev/gpt/bootpart is not mounted and should still show up. When you ran the 'gpart' commands, did you set the sysctl geom debug variable? [sysctl kern.geom.debugflags=17] After the reboot, are the labels still there? [gpart list | grep label] ]Peter[ I placed some other disk in (for the zfs pool) Now i have /dev/gpt/bootpart, but not the labels for swap and / I did not use the sysctl value. And yes the labels are stil in place. test# cd /dev/gpt test# ls -al total 1 dr-xr-xr-x 2 root wheel 512 Dec 23 20:02 . dr-xr-xr-x 10 root wheel 512 Dec 23 21:02 .. crw-r- 1 root operator0, 123 Dec 23 20:02 bootpart test# gpart list | grep label label: bootpart label: rootpart label: swap test# I will try the debugflag option. But it should not be nessacary i guess. thanks regards Johan If you have already mounted a /dev/da0p?, its label is removed from /dev/gpt - 'bootpart' is never mounted, that is why it's label remains. you just have to change /etc/fstab to the /dev/gpt/labels and then they will remain and get mounted - Or boot from a DVD, don't mount anything and you'll see the labels. ie: If you mount '/dev/da0p2'as '/' then '/dev/gpt/rootpart' will no longer be available, same goes for swap and everything else. If you mount 'dev/gpt/rootpart' as '/', the you'll have both '/dev/da0p2' and '/dev/gpt/bootpart' ]Peter[ Thanks that solved it. !! because i did not see them in /dev/gpt i did not change the /etc/fstab file to the appropiate config. I thought if they are not there, then i can not use them. Wrong assumption !!! I edited /etc/fstab to mount /dev/gpt/rootpart on / and /dev/gpt/swap on swap, and the machine booted like it should. Also the gpt entries are now there! Thanks again! Merry cristmas !!! regards Johan ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: gpart, modified label does not show up in /dev/gpt.
On Fri, 23 Dec 2011, Peter wrote: When you ran the 'gpart' commands, did you set the sysctl geom debug variable? [sysctl kern.geom.debugflags=17] That should not be necessary, or advisable. The only time it would be needed is to write to a partition that is mounted. If it is needed, the gpart write would give an error. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: gpart
Op 25-6-2011 15:14 schreef Dick Hoogendijk: OK, I follow the manual but still... I have a disk fo 20Gb I create a GPT table for the whole disk on it: # gpart create -s gpt /dev/md0 - md0 created # gpart show md0 34 8573 md0 GPT (4.2M) Only 4 Mb?? Not really what I wanted. Anyone an idea of why the whole disk is nog used? What am I doning wrong? Never mind. Problem solved. Wrong device. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: gpart questions
On 04/24/2011 12:24 PM, Helmut Schneider wrote: Hi, i'm playing around with (virtual) disks within a VMware ESXi 4.1 server: ... So, what did sysinstall that gpart didn't? You forgot to gpart create the inner BSD label on da1s1. 8 # mdconfig -a -t swap -s 512M md0 # gpart show md0 gpart: No such geom: md0. # gpart create -s mbr md0 md0 created # gpart show md0 = 9 1048563 md0 MBR (512M) 9 1048563 - free - (512M) # gpart add -b 63 -s 1048500 -t freebsd md0 md0s1 added # gpart show md0 = 9 1048563 md0 MBR (512M) 9 54 - free - (27K) 63 10485001 freebsd (512M) 10485639 - free - (4.5K) # gpart show md0s1 gpart: No such geom: md0s1. # gpart create -s bsd md0s1 md0s1 created # gpart show md0s1 = 0 1048500 md0s1 BSD (512M) 0 1048500 - free - (512M) # gpart add -b 16 -s 1048484 -t freebsd-ufs md0s1 md0s1a added # gpart show md0s1 = 0 1048500 md0s1 BSD (512M) 0 16 - free - (8.0K) 16 1048484 1 freebsd-ufs (512M) # ls -la /dev/md0* crw-r- 1 root operator0, 153 Apr 26 02:57 /dev/md0 crw-r- 1 root operator0, 157 Apr 26 02:58 /dev/md0s1 crw-r- 1 root operator0, 159 Apr 26 03:03 /dev/md0s1a 8 -- Fuzzy love, -CyberLeo Technical Administrator CyberLeo.Net Webhosting http://www.CyberLeo.Net cyber...@cyberleo.net Furry Peace! - http://.fur.com/peace/ ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: gpart questions
On Tue, 26 Apr 2011 03:10:48 -0500 CyberLeo Kitsana cyber...@cyberleo.net wrote: # gpart add -b 63 -s 1048500 -t freebsd md0 You could simplify it by using: gpart add -b 63 -t freebsd md0 # gpart add -b 16 -s 1048484 -t freebsd-ufs md0s1 Likewise: gpart add -b 16 -t freebsd-ufs md0s1 Or, if you want to specify a size, you can use -s 512m -- Bruce Cran ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: gpart bootcode manually
On Mon, 10 Jan 2011, David Demelier wrote: Because I wanted to crypt a /home partition, I tried to make my partition and slice using gpart in the fixit environment. There is the partition I've made : Fixit # gpart show ad0 = 63 625142385 ad0 MBR (298G) 63 6251423851 freebsd [active] (298G) Fixit # gpart show ad0s1 =0 625142385 ad0s1 BSD (298G) 0 63 - free - (32K) 631048576 1 freebsd-ufs (512M) 10486394194304 2 freebsd-swap (2.0G) 5242943 524288 4 freebsd-ufs (256M) 5767231 524288 5 freebsd-ufs (256M) 6291519 20971520 6 freebsd-ufs (10G) 27263039 597879346 7 freebsd-ufs (285G) To install the boot1, I tried this : gpart bootcode -b /mnt2/boot/boot1 ad2s1 gpart bootcode -b /mnt2/boot/boot1 ad2 But nothing happens, there is not the / spinning, just a blinking underscore. What did I wrong ? If you didn't do 'sysctl kern.geom.debugflags=16', it should give a warning. But maybe not in that case. I'd think it's a mistake to install bootcode to a slice, but gpart says you can do it provided you use -p and -i. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: gpart mbr scheme
Aha, GEOM_PART_MBR is not enabled by default in the 7.2 kernel. That changes with 8.0: http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/amd64/conf/DEFAULTS.diff?r1=1.10.8%3ARELENG_7_2tr1=1.10.8.1r2=1.19.2%3ARELENG_8tr2=1.19.2.1 I recompiled my kernel, now it works! On Oct 10, 2009, at 22:08 , Anselm Strauss wrote: Hi, I'm trying to partition a compact flash card with gpart. When I want to create a new MBR scheme it always complains: - gpart create -s mbr da0 gpart: scheme 'mbr': Invalid argument The GPT scheme works fine: - gpart create -s gpt da0 da0 created - gpart show da0 = 34 8027645 da0 GPT (3.8G) 34 8027645 - free - (3.8G) - gpart destroy da0 da0 destroyed The kernel driver seems to be loaded: - kldstat -v | grep mbr 278 g_mbr 277 g_mbrext Does gpart in 7.2 not support MBR partitioning? Cheers, Anselm ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org