Solved won't boot at all

hi

i really screwed up my BSD. I was trying to make the CDrom work on my Thinkpad.
So, i added hal_enable="YES" in /etc/rc.conf.
i also added a few lines in /etc/devfs.conf.
now my laptop wont even boot!

after i press power button, i see the Thinkpad logo, then i see a black screen with blinking white curser. It keeps blinking for forever.

it didnt even show the FreeBSD logo.



help!
 
ok i was panicking...and i forgot about Live.

So i did boot using Live USB.
And i was able to mount the main SSD and undo the chnages to rc.conf and devfs.conf.

But the main SSD drive still wont boot. It has same symptom as my described above.

what happened? i didnt do anything special today, except for editing those two etc files.

i added these lines before the proble started...

$ cat devfs.conf
...
link cd0 cdrom
link cd0 dvd
perm cd* 0666
perm xpt* 0666
perm pass* 0666



$ cat rc.conf |grep hal
hald_enable="YES"



i have just commented out the entries above, but still wont boot!
 
hi
So, i added hal_enable="YES" in /etc/rc.conf.
i also added a few lines in /etc/devfs.conf.
now my laptop wont even boot!

Do not despair. Use the Installer and choose Shell.

Then enter Single User Mode:

fsck -y
mount -u /
mount -a -t ufs
swapon -a


Now open Easy Editor with ee and comment out what you did to keep it from loading. Fix your spelling error in that line as well, but that's not what's keeping it from loading:

/etc/rc.conf
hald_enable="YES"

 
after i press power button, i see the Thinkpad logo, then i see a black screen with blinking white curser. It keeps blinking for forever.
Do you see the boot manager, which could look like this?
boot0:
Code:
F1 DOS
F2 FreeBSD
F3 Linux
F4 ??
F5 Drive 1

Default: F2

boot2:
Code:
>> FreeBSD/i386 BOOT
Default: 0:ad(0,a)/boot/loader
boot:

Next would be the loader (with a logo).
 
Do you see the boot manager, which could look like this?
boot0:
Code:
F1 DOS
F2 FreeBSD
F3 Linux
F4 ??
F5 Drive 1

Default: F2

boot2:
Code:
>> FreeBSD/i386 BOOT
Default: 0:ad(0,a)/boot/loader
boot:

Next would be the loader (with a logo).
no dont see
 
Then I would assume that the boot partition or boot manager is messed up (e.g. missing).
Not sure what to do there. Probably go to the live USB, and make sure these are present.
 
Can you provide more info?
Boot from bootable USB then enter in Live CD and provide the output of the following commands:
sysctl machdep.bootmethod
gpart show
 
Can you provide more info?
Boot from bootable USB then enter in Live CD and provide the output of the following commands:
# sysctl machdep.bootmethod
machdep.bootmethod: BIOS

gpart show
 

Attachments

  • 532F6DD2-E630-4CEE-ADE7-472A2AFD53C5.jpeg
    532F6DD2-E630-4CEE-ADE7-472A2AFD53C5.jpeg
    1.8 MB · Views: 112
Ok, can you enter in your bios and check if your SSD is the first boot device or enter in boot menu during bios post and select to boot from the SSD.
 
Hm, don't know. I'd try to restore the boot loader.

Ok. So, I went into Live, and I did the "restore the boot loader" per eternal_nobb, by...

# gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ada0


Then, I powered down, unpluged the USB, and powered-up the machine. This time, it is booting like normal!
I logged in and fired up firefox. Everything seems to be working fine.

Wow! Not sure why the boot loader got messed up.

Like I said in my first post, the problem started right after I edited rc.conf and devfs.conf.

Before that, I was doing some serious downloading. I was using firefox to download 3 iso image files, which totaled about 8 Gigabyte. These files are sitting in my user home directory. I still have about 10 more Gigabyte to download.
 
Ok...I just remembered, right before the problem started, I did something I don't normally do.

I started firefox using this way...because I did not want to see all the warnings and error messages from firefox...


$ firefox 1>/dev/null 2>/dev/null


Did this redirection kill my boot loader?
 
Glad you got it solved.
So, is it possible all that data messed up the boot loader?
Not at all. This is perfectly fine.
Did this redirection kill my boot loader?
Should not be the case. If you are brave, you could try again. ;)
Is this okay way to start firefox?
Firefox spamming the console annoys me too. I didn't find a way to silence it, yet. But redirecting its output to /dev/null should not overwrite your bootloader.
 
No. To damage your bootloader you should write something inside LBA0 (first sector on the hard disk) where the MBR is or write something inside /dev/ada0p1 where the freebsd-boot partition is. Editing files in /etc/ like rc.conf or devd.conf will not cause this.

Do you remember anything else? Like using dd ?
 
No. To damage your bootloader you should write something inside LBA0 (first sector on the hard disk) where the MBR is or write something inside /dev/ada0p1 where the freebsd-boot partition is. Editing files in /etc/ like rc.conf or devd.conf will not cause this.

Do you remember anything else? Like using dd ?
No, didn't use dd.

Didn't really do much today. So, I am surprise if I did something to kill the boot loader.
 
well, it happened again. The boot loader just died again.

So, i restored it. and everything back to normal. but for how long?


# gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ada0
 

Attachments

  • F1B6EDF9-A55A-4CC7-9B15-3AF247C1E33D.jpeg
    F1B6EDF9-A55A-4CC7-9B15-3AF247C1E33D.jpeg
    540.7 KB · Views: 112
well, it happened again. The boot loader just died again.

So, i restored it. and everything back to normal. but for how long?


# gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ada0
Is there another OS installed on this laptop? Was it UEFI-booting Windows at some point?
 
Is there another OS installed on this laptop? Was it UEFI-booting Windows at some point?
well...yes it was running Windows...i dont know what is UEFI...

i have Win-7 on a HDD harddisk on the shelf.
i have Freebsd12.2 on a SSD inside my laptop.

i have been running on the SSD only, up til last week.

Last week, i removed SSD and inserted the HDD, and installed Win-7 onto the HDD via Lenovo Recovery DVDs. I have been playing with Win-7 this week. I forgetten how bad Windows is.

Yesterday, I removed the HDD, and inserted the SSD back into my Thinkpad. So, I was using Freebsd yesterday just fine. But today, the load loader is messed up.

i dont plan to use Win7 anymore. i will keep the HDD on the shelf just in case i need Win7 again for some reason.
 
Is there another OS installed on this laptop? Was it UEFI-booting Windows at some point?
i forgot to mention...

Two days ago while HDD is still inside my Thinkpad, i plugged my SSD into USB, and booted into FreeBsd. It worked just fine.
 
Last week, i removed SSD and inserted the HDD, and installed Win-7 onto the HDD via Lenovo Recovery DVDs.
I'm guessing that recovery clobbered your boot sector.

It's possible to duel-boot Windows 7 with Freebsd (I do it on this machine), but I use the Freebsd boot0 manager. Here's how to configure it
 
Back
Top