*BSDThis forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am getting into PC-BSD 10.0, and installed it onto the first partition of my second hard disk. Once I rebooted, I found it messed with the first hard disk's MBR, and that on my second hard disk the 2nd partition after my BSD one was corrupted (the Linux installation on it was acting weird - good riddens, and am not trying to recover it).
When I try to boot, GRUB says that a device (it names it by a UUID) isn't available, and then it throws me into the rescue prompt. Is there a way that I can manually change the GRUB settings so it works? It seems the graphical installer does not provide a lot of flexibility in how to configure GRUB.
I've tried using the rescue environment and was going to chroot to the BSD installation to fiddle with GRUB, but I couldn't figure out how to mount the BSD partition. How are disks labeled in BSD? I tried looking it up on online guides, but I couldn't get anything to work. Also, what's a slice?
Here's what my partition layout (from fdisk and parted), as partitioning info is imperative when configuring boot settings.
Code:
ubuntu@ubuntu:~/Documents/firefox$ sudo fdisk /dev/sda
Command (m for help): p
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xdc9d61b2
Device Boot Start End Blocks Id System
/dev/sda1 63 80324 40131 6 FAT16
/dev/sda2 * 81920 31141887 15529984 7 HPFS/NTFS/exFAT
/dev/sda3 31141888 1953521663 961189888 f W95 Ext'd (LBA)
/dev/sda5 31143936 117159935 43008000 7 HPFS/NTFS/exFAT
/dev/sda6 117161984 143785983 13312000 7 HPFS/NTFS/exFAT
/dev/sda7 143788032 983468031 419840000 7 HPFS/NTFS/exFAT
/dev/sda8 983470080 1618350079 317440000 7 HPFS/NTFS/exFAT
Command (m for help): q
ubuntu@ubuntu:~/Documents/firefox$ sudo parted /dev/sdb
GNU Parted 2.3
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: ATA WDC WD20EZRX-00D (scsi)
Disk /dev/sdb: 2000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Number Start End Size File system Name Flags
1 135MB 10.9GB 10.7GB
2 10.9GB 37.7GB 26.8GB zfs msftdata
3 37.7GB 1148GB 1111GB msftdata
4 1148GB 1578GB 429GB fat32 primary msftdata
6 1578GB 1631GB 53.7GB ext4 primary msftdata
7 1631GB 1642GB 10.2GB
8 1642GB 1642GB 537MB
5 1998GB 2000GB 2067MB linux-swap(v1) primary msftdata
(parted) q
ubuntu@ubuntu:~/Documents/firefox$
I've tried a tons of googles on the issues, but can't quite figure it out.
Since no one else has stepped up, I'll offer what comments that I can but...
* I am new to BSD myself
* I am not a Grub user
* I have never used Gpt partitions
That said, I have recently installed FreeBSD into a multi-disk, multi-boot config with Slackware using Lilo, and I know that chain booting to the BSD (primary) partition works easily (I did not allow BSD to write to the MBR of either disk).
Although I do not know the Grub syntax, I know that Grub can chain boot just like Lilo, and can even be mixed into a Lilo environment, so you should be able to easily chain boot from your Grub MBR setup to the BSD boot partition just as I did with Lilo.
If you can still boot to Linux on the first drive, I would suggest that you get the id or uuid of the BSD disk/partition, something like this...
Code:
ls -l /dev/disk/by-id/
ls -l /dev/disk/by-uuid/
Then search for the correct Grub syntax to chain boot by disk id and you should be able to get there.
For completeness, the corresponding Lilo chain syntax is something like...
Code:
other = /dev/disk/by-uuid/xxxyyyzzz...
label = FreeBSD-10.0
When referenced by uuid it should have no difficulty identifying the partition - as long as you get the right one!
I tend to use bios to assist me on this sort of two drive issue.
What I do is either remove the first drive or make the second drive the first in the hard drive boot order in bios. This makes the installers and usually me not watching installers use the second drive now as destination for grub and such.
Then I return system to normal and select boot in bios or from F key.
You can try to repair your issue if you want maybe. PC-BSD can use FreeBSD loader or Grub2. If your system has grub then you may have to chain load to grub2 in different location.
Thanks for the help, but now in addition to my 2nd Linux partition, the whole partition table is shot after an attempt to use the BSD bootloader from the getgo in the graphical installer. I'm pulling up testdisk on an Ubuntu Live-CDto recover my data, and ditching this Operation Barbarossa. I'll do something else with the space I would have used for BSD, and will try to run FreeBSD in VirtualBox.
Thanks for the help, but now in addition to my 2nd Linux partition, the whole partition table is shot after an attempt to use the BSD bootloader from the getgo in the graphical installer. I'm pulling up testdisk on an Ubuntu Live-CDto recover my data, and ditching this Operation Barbarossa. I'll do something else with the space I would have used for BSD, and will try to run FreeBSD in VirtualBox.
Sorry to hear it, but I sympathize.
I have read back over your original post thinking a fresh look might ring some bell or other, but my unfamiliarity with all of Grub, Gpt and Zfs make me reluctant to offer any ill-founded advice!
The fact that existing partitions seem to have been corrupted is a little troubling and would make me double-check the drive itself, as in potential hardware problem. You should be able to use the smartmon tools on it from the working Linux boot.
In any event - good luck! Let us know how it works out.
I have seen quite a few threads on LQ in recent months with advice and instructions for its use. From one of those I found this link to TestDisk Step by Step.
I know that the universal advice for a corrupted drive is to not mount it writeable - copy an image to another drive and work from the image, otherwise it degenerates into mush...
... and of course, I would suggest that you open a new thread on the subject, maybe in the hardware or software sections of LQ, to attract responses from others who know but might not visit the BSD forum.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.