# Re-Install FreeBSD 11.0 (or 10.3) amd64 on GPT killing system boot.



## Demis (Jun 2, 2017)

Sorry for my English.

 Can someone check?
 Resetup FreeBSD 11.0 amd64 killing system boot.

 How to reproduce?

 The description is long.
 The source data:

 1. Physical computer Dell OptiPlex 790 bios A18 RAM 4Gb, internal video, hdd 80GB 2,5"
 2. FreeBSD-11.0-RELEASE-amd64-disc1.iso
 3. Boot type in BIOS "Legacy" (not UEFI)
 4. Network adapter is connect to lan and Internet
 5. The virtual machine has not been tested

 Make setup on factory clean hdd.
 boot from CD
 install
 keymap selection
 set hosname
 distribution select
 add doc
 add src

 Partitioning
 Manual

 Create
 Select GPT
 Create -> freebsd-boot 64KB
 Create -> freebsd-ufs 4GB / (uncheck journal in options)
 Create -> freebsd-swap 4GB
 Create -> freebsd-ufs 16GB /var (uncheck journal in options)
 Create -> freebsd-ufs 40GB /usr (uncheck journal in options)
 (Not all space)

 Finish
 Commit

 Wait to end setup.
 (set root pass, network, time zone,date,time, ntpd)
 System hardening select all but NOT selected only "randomize the PID" and "disable sendmail"
 Adding one user witch invate "wheel"
 Reboot.
 Remove CD.

 logon as root.
 Ok.
 Good.
 It's working

 =================
 Next step.
 I want reconfigure my setup.
 Reboot.
 Load again from CD
 =================

 install
 keymap selection
 set hosname
 distribution select
 add doc
 add src

 Partitioning
 Manual

 See old partition, delete all, no touch GPT sheme.

 select freebsd-ufs 40GB /usr -> delete
 select freebsd-ufs 16GB /var -> delete
 select freebsd-swap 4GB -> delete
 select freebsd-ufs 4GB / -> delete
 select freebsd-boot 64KB -> delete

 Create -> freebsd-boot 64KB
 Create -> freebsd-ufs 3GB / (uncheck journal in options)
 Create -> freebsd-swap 3GB (auto recalc to 2Gb)
 Create -> freebsd-ufs 15GB /var (auto recalc to 13Gb) (uncheck journal in options)
 Create -> freebsd-ufs 30GB /usr (auto recalc to 27Gb) (uncheck journal in options)
 (Not all space)

 Finish
 Commit

 Wait to end setup.
 (set root pass, network, time zone,date,time, ntpd)
 System hardening select all but NOT selected only "randomize the PID" and "disable sendmail"
 Adding one user witch invate "wheel"
 Reboot.
 Remove CD.

 Fail boot.

Get messages:

```
Starting file system checks:
/dev/ada0p2: FILE SYSTEM CLEAN; SKIPPING CHECKS
/dev/ada0p2: clean, 724414 free (342 frags, 90509 blocks, 0.0% fragmentation)
Cannot find file system super block
Cannot find file system super block
Cannot find file system super block
Cannot find file system super block
THE FOLOWING FILE SYSTEMS HAD AN UNEXPECTED INCONSISTENCY:
ufs: /dev/ada0p4 (/var), ufs: /dev/ada0p5 (/usr)
Warning! Some of the devices might not be available : retrying
Waiting 30s for the root mount holders: usbus1 usbus0
...
(white message from usb, keyboard, etc (no errors)
...
Restarting file system checks:
/dev/ada0p2: FILE SYSTEM CLEAN; SKIPPING CHECKS
/dev/ada0p2: clean, 724414 free (342 frags, 90509 blocks, 0.0% fragmentation)
Cannot find file system super block
Cannot find file system super block
Cannot find file system super block
Cannot find file system super block
THE FOLOWING FILE SYSTEMS HAD AN UNEXPECTED INCONSISTENCY:
ufs: /dev/ada0p4 (/var), ufs: /dev/ada0p5 (/usr)
Unknown error 3: help!
ERRROR: ABORTING BOOT (sending GIGTERM to parent)!
дата время init: /bin/sh on /etc/rc terminated abnormally, going to single user mode
Enter  full pathname of shell or RETURN for /bin/sh:
Cannot read termcap database:
using dumb terminal settings.
#
```
 THE END

 For get next good setup use "gdisk 2 /wipedisk" from Norton utilities to clean disk.

 What's wrong?
 It's normaly?

(This sended to questionsATfreebsd.org too)

Demis


----------



## Phishfry (Jun 2, 2017)

Demis said:


> Next step.
> I want reconfigure my setup.


What you are calling reconfigure looks like re-install to me from your post.
At this point I would run a dd=/dev/zero of=/dev/ada0 bs=1M
This will wipe the disk by writing zeros to it. Then re-install.


----------



## Demis (Jun 2, 2017)

The problem occurs only when we install the system and the disk system has already been plus to change the size of partitions. In this case, a new installation does not work correctly with the disk. It's like with the addition of partity on the same disk in FreeBSD 9.3 or 10.3. Never tried? Try.


----------



## Demis (Jun 2, 2017)

Sorry. "Reconfiguration" in my head only.
Of course there are other trivial ways.
For example in live-mode
gpart delete -i {1,2,3,4,5,} ada0
gpart destroy ada0


----------



## Demis (Jun 3, 2017)

Found how to repeat!
How to model the problem on a virtual machine?

VirtualBox, RAM 4Gb, Fixed(!!!) size VM file 80Gb.

Virtual machine with dynamic resizing of the VM file has no problems.
Virtual machine with fixed size of VM file shows the problem.
Use the last option.

See PR:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=219849


----------

