# 9-BETA-3 boot issue when partitioning with shell



## je33 (Oct 16, 2011)

I decided to try 9-BETA-3 on a 64G Crucial M4. On first pass accepted "Guided" and took the defaults for partitioning. All went well and system installed and ran fine. However, [cmd=]gpart ada0[/cmd] showed that partitions were "not" aligned on 4k boundaries.

From the literature I located it looked like there was a consensus that aligning on 1M boundaries was the way to go. So, in the next install pass, I chose "Shell" from the partition dialog; created 1M aligned: freebsd-boot, freebsd-ufs and freebsd-swap partitions. I then [cmd=]newfs -U /dev/ada0p2[/cmd] [cmd=]mount /dev/ada0p2 /mnt[/cmd] [cmd=]vi /tmp/bsdinstall_etc/fstab[/cmd] (creating entries for / and swap) then finally [cmd=]exit[/cmd]

From there the installation proceeded as in the default install above. But, no joy, would not boot. My new Asus MB w/ EUFI went right past the new install. As well: when I "F8 and selected the new installation drive", no boot was realized.

Questions:

Does this look like it might be an issue with the Asus EUFI BIOS?

Does not the installer load the boot image into the freebsd-boot partion?

If not, where would it be on the install media (memstick.img) so that I may use it to install at creation of the partition.

tia !


----------



## wblock@ (Oct 16, 2011)

je33 said:
			
		

> I decided to try 9-BETA-3 on a 64G Crucial M4. On first pass accepted "Guided" and took the defaults for partitioning. All went well and system installed and ran fine. However, [cmd=]gpart ada0[/cmd] showed that partitions were "not" aligned on 4k boundaries.



Default is a 64K freebsd-boot, followed by freebsd-ufs, and freebsd-swap.  What did it show?



> From the literature I located it looked like there was a consensus that aligning on 1M boundaries was the way to go. So, in the next install pass, I chose "Shell" from the partition dialog; created 1M aligned: freebsd-boot,



There's a tip in the bsdinstall chapter about this: freebsd-boot should be no larger than 512K at present.  But you should start the freebsd-ufs partition after it at 1M:

```
# gpart create -s gpt /dev/ada0
# gpart add -t freebsd-boot -l gpboot -s 128K ada0
# gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ada0
# gpart add -t freebsd-ufs -l gprootfs [color="Red"]-b 1M[/color] -s 20G ada0
# gpart add -t freebsd-swap -l gpswap -s 512M ada0
```

Adjust the labels and sizes appropriately.  This shows 128K, which is big enough and still aligns to 4K sectors.  Or use 256K or 512K, just not 1M.



> Does this look like it might be an issue with the Asus EUFI BIOS?
> 
> Does not the installer load the boot image into the freebsd-boot partion?
> 
> If not, where would it be on the install media (memstick.img) so that I may use it to install at creation of the partition.



While it could be a problem with the BIOS, try the 512K or smaller size first.  bsdinstall does install the bootcode, which is /boot/gptboot.


----------



## je33 (Oct 16, 2011)

> Default is a 64K freebsd-boot, followed by freebsd-ufs, and freebsd-swap. What did it show?



From my guided partition (entire disk) install:


```
# gpart show ada0
=>       34  125045357  ada0  GPT  (59G)
         34        128     1  freebsd-boot  (64k)
        162  117440384     2  freebsd-ufs  (56G)
  117440546    6250496     3  freebsd-swap  (3G)
  123691042    1354349        - free -  (661M)
```

162 sticks out.



> There's a tip in the bsdinstall chapter about this: freebsd-boot should be no larger than 512K at present. But you should start the freebsd-ufs partition after it at 1M:



Works, thank you. Obviously I fixated on the 1M ufs start offset along with several posts at large stating that the "future" safe alignment boundary is 1M, and decided to include all the extra space into the boot partition.

From my current installation:


```
#gpart show ada0
=>       34  125045357  ada0  GPT  (59G)
         34        256     1  freebsd-boot  (128k)
        290       1758        - free -  (879k)
       2048  117440512     2  freebsd-ufs  (56G)
  117442560    7598080     3  freebsd-swap  (3.6G)
  125040640       4751        - free -  (2.3M)
```

Now I'm wondering if Trim support should be enabled?

Thanks again wblock@, sincere regards


----------



## wblock@ (Oct 16, 2011)

je33 said:
			
		

> From my guided partition (entire disk) install:
> 
> 
> ```
> ...



You're right.  This needs to be reported as a bug, the sooner the better.  Do you want to, or should I?


----------



## wblock@ (Oct 16, 2011)

je33 said:
			
		

> Now I'm wondering if Trim support should be enabled?



Yes for a SSD, according to tunefs(8).  Untested by me...


----------



## je33 (Oct 16, 2011)

I know I need to learn the bug reporting activity someday but, for the sake of expediency and force of your reputation, I believe you better do it..  Thanks!


----------



## je33 (Oct 16, 2011)

Also, would you post a link to the bug report here?


----------



## wblock@ (Oct 16, 2011)

Here's what I did.

Go to http://www.freebsd.org/support/bugreports.html.
Use View or search problem reports, search for bugs regarding bsdinstall.  None about this problem.
Enter the problem report information.

There's also a command line send-pr(1).  It makes my brain itch, so I prefer the web version.


----------



## wblock@ (Oct 16, 2011)

It is PR PR 161720.


----------



## je33 (Oct 16, 2011)

oops. I took the plunge and reported it also..  http://www.freebsd.org/cgi/query-pr.cgi?pr=misc/161722

Also, began to think that the second partition might indeed start on a 4k boundary where 162 * 512 / 4k = 20736, an even number. Oh my!


----------

