DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 22nd August 2008
tad1214 tad1214 is offline
Real Name: Thomas Donnelly
Fdisk Soldier
 
Join Date: Jun 2008
Location: Houston, TX
Posts: 60
Thanked 0 Times in 0 Posts
Default URGENT HELP, BOOTLOADER ISSUE

Hi All,

I just echoed linux_enable="YES" to the end of /boot/loader rather than /boot/loader.conf

I was in a hurry and hit tab and went.

Is this bad? What do I need to do to fix it. This is on my workstation so when I try to reboot, I have a feeling it wont be coming back....

Thanks!
-=Tom
Reply With Quote
  #2   (View Single Post)  
Old 22nd August 2008
ephemera's Avatar
ephemera ephemera is offline
Knuth's homeboy
 
Join Date: Apr 2008
Posts: 537
Thanked 49 Times in 43 Posts
Default

if you have the kernel sources then do the following:

# cd /sys/boot
# make
# make install

if not let us know.
Reply With Quote
  #3   (View Single Post)  
Old 22nd August 2008
harisman's Avatar
harisman harisman is offline
Fdisk Soldier
 
Join Date: May 2008
Location: Hellas (Greece)
Posts: 66
Thanked 5 Times in 4 Posts
Default

You may search if there is any /boot/loader.old

If there is, copy it back as /boot/loader and retry booting
Reply With Quote
  #4   (View Single Post)  
Old 22nd August 2008
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 3,154
Thanked 182 Times in 149 Posts
Default

How did you echo?
  1. echo linux_enable="YES" > /boot/loader
  2. echo linux_enable="YES" >> /boot/loader
The first command will have overwritten "boot/loader" with linux_enable=YES. IOW the former contents is gone, which is bad.

The second command only will have appended linux_enable=YES to the end of the program/binary loader which usually is not that harmful.

I just did this on OpenBSD
Code:
$ mkdir temp
$ cd temp
$ cp /bin/ls .
$ ls -l

total 448
-r-xr-xr-x  1 j65nko  j65nko  210416 Aug 23 01:20 ls

$ chmod +w ls
$ ls -l

total 448
-rwxr-xr-x  1 j65nko  j65nko  210416 Aug 23 01:20 ls

$ echo echo linux_enable="YES" >>ls
$ ls -l

total 448
-rwxr-xr-x  1 j65nko  j65nko  210438 Aug 23 01:21 ls

$ ./ls -l

total 448
-rwxr-xr-x  1 j65nko  j65nko  210438 Aug 23 01:21 ls
Here the ls binary with the appended text just executes. Cannot guarantee loader will do the same or whether BTX will complain

From man loader
Code:
DESCRIPTION
     The program called loader is the final stage of FreeBSD's kernel boot-
     strapping process.  On IA32 (i386) architectures, it is a BTX client.  It
     is linked statically to libstand(3) and usually located in the directory
     /boot.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
  #5   (View Single Post)  
Old 23rd August 2008
tad1214 tad1214 is offline
Real Name: Thomas Donnelly
Fdisk Soldier
 
Join Date: Jun 2008
Location: Houston, TX
Posts: 60
Thanked 0 Times in 0 Posts
Default

I echoed it >> (append) and I figured it wasn't completely the end of the world, as there is always a way to fix it in FBSD. I followed ephemera's advice and it was a success. I had to wait until today to try and reboot because I had to finish an assignment first :-O. Thank you all very very much. Just one more prime example of how FreeBSD won't hold your hand :-), which is why I love it.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
4.5 -current issue roundkat OpenBSD Installation and Upgrading 11 28th February 2009 02:11 PM
FFS permission issue marc OpenBSD General 2 2nd February 2009 07:31 PM
Possible SMP Issue? MetalHead OpenBSD General 1 25th November 2008 03:52 AM
Nagios issue scottro General software and network 5 31st May 2008 10:18 AM
RAM issue nikkon FreeBSD General 5 7th May 2008 04:26 AM


All times are GMT. The time now is 01:55 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick