Grub Broken After Repository Upgrade

Need support for GhostBSD. Ask here if your question does not fit elsewhere.
Post Reply
frogprince
Posts: 67
Joined: Mon Jul 10, 2017 9:50 pm

Grub Broken After Repository Upgrade

Post by frogprince »

Hi, I tried to upgrade my 10.3/MATE/AMD64 repositories as per:

viewtopic.php?f=69&t=715

After finishing the revision and adding the FreeBSD.conf file, I clicked
on it to double check the contents. Of all things, LibreOffice started to
open and then hung; the cursor would not move nor would the application
quit. So I forced a power off and reboot, and now get an error message
that states that I need to load the kernel first. I assume this means that
GRUB got corrupted somehow. Super Grub Disk did not run, probably
because this is BSD and not Linux. Can someone please help me fix this?

Thanks in advance.
Vas you efer in Zinzinnati? Asus F1A75-M, AMD A8-3870 APU, 6 GB DDR3/120 GB SSD, GeForce 210, missing front drive panel just like its owner.
ASX
Posts: 988
Joined: Wed May 06, 2015 12:46 pm

Re: Grub Broken After Repository Upgrade

Post by ASX »

frogprince wrote:Hi, I tried to upgrade my 10.3/MATE/AMD64 repositories as per:

viewtopic.php?f=69&t=715

After finishing the revision and adding the FreeBSD.conf file, I clicked
on it to double check the contents. Of all things, LibreOffice started to
open and then hung; the cursor would not move nor would the application
quit.
If I read correctly, you double clicked on FreeBSD.conf, libreoffice started and hang ? If so, note that no upgrade took place at that time, and it is not clear what was the issue ... but is not upgrade related.

So I forced a power off and reboot, and now get an error message
that states that I need to load the kernel first. I assume this means that
GRUB got corrupted somehow. Super Grub Disk did not run, probably
because this is BSD and not Linux. Can someone please help me fix this?

Thanks in advance.
If the system doesn't boot, like it seems, the only thing you can do is booting a live media (either DVD or USB, either FreeBSD 10.x or GhostBSD 10.x), boot up to the login prompt,
log in as root,
start a terminal
run the following cpmmands:

Code: Select all

gpart show -p
That will show you the partitions related to your installation and eventually those related to the USB stick.

For each UFS partition run the following command:

Code: Select all

fsck_ffs -fy /dev/ada0s1
substitute ada0s1 with the denomination of each UFS partition.

If you see that fsck_ffs is doing some work, eventually reboot, if instructed do do so, and repeat the procedure until all filesystems are "clean",
when done, shutdown, remove the USB stick/DVD, and reboot.
frogprince
Posts: 67
Joined: Mon Jul 10, 2017 9:50 pm

Re: Grub Broken After Repository Upgrade

Post by frogprince »

First, thank you; this was the answer I was looking for.

For the sake of documentation, slim would not log into the GhostBSD/MATE/AMD64 iso as root, only as ghostbsd. I did so, went to Applications/Accessories, and clicked on the root terminal. It opened with a warning, but gave me root access.

Code: Select all

gpart show -p


did indeed show me ada0, ada0p1, ada0p2, ada0p3, and the CD/DVD contents. (I have no other BSD system to dd from). Running

Code: Select all

fsck_ffs -fy /dev/adaop1


yielded

Code: Select all

** /dev/adaop1
Cannot find file system superblock
ioctl (GCINFO) Inappropriate ioctl for device
fsck_ffs /dev/adaop1 Can't read disk label
My guess is that I forced a power off shut down at EXACTLY the wrong time. Since there is no data at risk, my plan is to reformat the HD so that hopefully the drive firmware will discard the bad block and replace it with another, and then reinstall 10.3. If that boots, I'll go through the process of updating and changing the repository again, and adding a couple of pieces of favorite software. If the reinstall won't work, I'll replace the HD with another from my pile.
Vas you efer in Zinzinnati? Asus F1A75-M, AMD A8-3870 APU, 6 GB DDR3/120 GB SSD, GeForce 210, missing front drive panel just like its owner.
ASX
Posts: 988
Joined: Wed May 06, 2015 12:46 pm

Re: Grub Broken After Repository Upgrade

Post by ASX »

I see you wrote adaop1 instead of ada0p1

of course adaop1 doesn't exist at all (unless you mistyped on forum only ...)

also, make sure to fsck only the UFS partitions, for others partition types like swap fsck is not applicable.
frogprince
Posts: 67
Joined: Mon Jul 10, 2017 9:50 pm

Re: Grub Broken After Repository Upgrade

Post by frogprince »

Thank you ASX; fortunately, the typo was in my posting, not in my fsck line. I've installed FreeBSD before,
and I understand the different disk identifiers.

Since I've worked a lot with older machines, I keep a copy of Seagate Seatools on a thumb drive. I used it
here to run "Erase all" as a way to low level format the HD and force its firmware to move the bad block address
to a new good block. I reinstalled GBD, after which it booted immediately, so the fix worked. I then
updated all the software, struggled briefly but successfully with nVidia, and now have another good
system. I do believe that I'll wait a while before trying the GBD repository shift, however.
Vas you efer in Zinzinnati? Asus F1A75-M, AMD A8-3870 APU, 6 GB DDR3/120 GB SSD, GeForce 210, missing front drive panel just like its owner.
Post Reply