LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-12-2009, 11:57 AM   #1
Rollo69
Member
 
Registered: Sep 2005
Location: Charlotte, NC
Distribution: Slack 12.0
Posts: 190

Rep: Reputation: 30
lilo issue after adding hard drive


I added a sata drive in the past week and had problems getting/seeing the drive. Well yesterday I finally got it so I could mount it automatically from boot and access the drive. Here's my post with the info about adding the sata drive.
I went to adjust lilo.conf so that me new image would be the default.
Code:
cat /etc/lilo.conf
# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
lba32
append="boot=/dev/hda"
boot = /dev/hda
message = /boot/boot_message.txt
prompt
timeout = 600
default = Slack_10.2.6.2
# Override dangerous defaults that rewrite the partition table:
change-rules
  reset
# VESA framebuffer console @ 1024x768x256
vga = normal
# Normal VGA console
# vga = normal
# ....
# Linux bootable partition config begins
#
image = /boot/vmlinuz.old
  root = /dev/hda1
  label = Linux.old
  read-only

#
image = /boot/bzImage-S
  root = /dev/hda1
  label = Slack_sata
  read-only
#
image = /boot/bzImage
  root = /dev/hda1
  label = Slack_10.2.6.2
  read-only
#
# Linux bootable partition config ends
Then after saving and running lilo -v I get this error.
Quote:
lilo -v
LILO version 22.5.9, Copyright (C) 1992-1998 Werner Almesberger
Development beyond version 21 Copyright (C) 1999-2004 John Coffman
Released 08-Apr-2004 and compiled at 00:18:50 on May 21 2004.

Reading boot sector from /dev/hda
Warning: Kernel & BIOS return differing head/sector geometries for device 0x80
Kernel: 65535 cylinders, 16 heads, 63 sectors
BIOS: 1023 cylinders, 255 heads, 63 sectors
Warning: '/proc/partitions' does not match '/dev' directory structure.
Name change: '/dev/sda' -> '/dev/sda'
Name change: '/dev/sda1' -> '/dev/sda1'
Fatal: open /dev/sda: No such file or directory
Since it didn't work I switched it back to the way lilo was before change and still same output after running lilo. I've also thought that since the sda (sata) drive was mounted it could be causing the issue but I umount the drive and still same output after lilo.

My main concern is can I reboot with this lilo issue??

Thanks for any and all help.!!
 
Old 03-12-2009, 02:17 PM   #2
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Rep: Reputation: 55
A little confusing here since SATA drives normally show up as /dev/sda like the messages said. Not sure if you really want to point to your IDE drive like in your config or if you meant to change this.

lilo -v isn't a good way to install lilo. If you want to install lilo in the MBR, take the boot= line out of your lilo.conf and specify a drive on the command line:

lilo -v -b /dev/hda # for your ide drive mbr
lilo -v -b /dev/sda # for your sata drive mbr

BTW you will boot alot faster if you use compact in your lilo.conf. Just add it on a line after lba32.

Last edited by Randux; 03-12-2009 at 02:21 PM.
 
Old 03-12-2009, 02:42 PM   #3
justwantin
Member
 
Registered: Aug 2003
Location: Melbourne, Australia
Distribution: Slackware, Slackwarearm
Posts: 878

Rep: Reputation: 120Reputation: 120
On my machine an ide drive is hda, a sata drive would be sda
Quote:
/dev/hda1 / reiserfs defaults 1 1
/dev/sda1 /multimedia jfs defaults 1 2
Have you tried using sda1 instead of hda1 for the sata drive? You have a stanza with the name as Slack_SATA but root = /dev/hda1
 
Old 03-12-2009, 07:38 PM   #4
Rollo69
Member
 
Registered: Sep 2005
Location: Charlotte, NC
Distribution: Slack 12.0
Posts: 190

Original Poster
Rep: Reputation: 30
I believe there is a misunderstanding of my lilo.conf file. The part you see as "image = bzImage-S" and "label = Slack_sata" is just were I recompiled my kernel so my sata controller was built into the kernel. Not to boot up from the sata drive. I just wanted to get the sata partition sda4 to auto mount at boot up while I finish building Slack 12 on the sata drive.

to Randux .. I was under the impression that lilo -v was the way to update my lilo.conf after making changes to it in 10.2, but I will give your command a try to see if that is my problem. I will also change lilo so compact is in the line below lba32.

I only tried to change the "default" line in lilo.conf so the Slack_sata would be the default and not Slack_10.2.6.2 but didn't work so I changed it back and still have the error I posted above. I just didn't understand why lilo wouldn't update when the only thing that changed was my fstab.

Hope this clears things up a bit.

Thanks for the help and info.
 
Old 03-12-2009, 08:49 PM   #5
justwantin
Member
 
Registered: Aug 2003
Location: Melbourne, Australia
Distribution: Slackware, Slackwarearm
Posts: 878

Rep: Reputation: 120Reputation: 120
Quote:
I just wanted to get the sata partition sda4 to auto mount at boot up while I finish building Slack 12 on the sata drive.
To have the sata partition to mount at boot you can put an entry in /etc/fstab. In my example:
Quote:
/dev/sda1 /multimedia jfs defaults 1 2
This line is read from /etc/fstab at boot and /dev/sda1 is mounted at /multimedia provided I have first create that directory.

You could also mount it cli with the command mount. Trying it that way should give you some error messages which might help if there is a problem. For example:
Quote:
mount /dev/sda1 /multimedia -t jfs
could be used to mount my sata partition at /multimedia.
 
Old 03-13-2009, 12:37 AM   #6
Rollo69
Member
 
Registered: Sep 2005
Location: Charlotte, NC
Distribution: Slack 12.0
Posts: 190

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by justwantin View Post
To have the sata partition to mount at boot you can put an entry in /etc/fstab. In my example:
Quote:
/dev/sda1 /multimedia jfs defaults 1 2
This line is read from /etc/fstab at boot and /dev/sda1 is mounted at /multimedia provided I have first create that directory.
I have gotten the sata drive to mount at boot, and tried to have lilo load up the image that has my sata controller compiled in the kernel ( bzImage-S) but ran into the lilo error. Tried switching it back but still lilo error.

I don't know what's causing the lilo error.?? Or if I can just reboot without any problems??

Thanks for your help Justwantin..
 
Old 03-13-2009, 01:18 AM   #7
justwantin
Member
 
Registered: Aug 2003
Location: Melbourne, Australia
Distribution: Slackware, Slackwarearm
Posts: 878

Rep: Reputation: 120Reputation: 120
Sometimes I just back up and start from scratch ..... again. Then methodically work through the whole thing again one step at a time until it breaks or continues working correctly

If I were you I'd run liloconfig and let slack make me a new simple lilo and install it to MBR and see if it all works with the default kernel. Then edit and add stanza and for another kernel and see if that works.

Also I am wondering if there is something out of ordinary with your sata drive or maybe the kernel you compiled.

Sorry I can't be of more help but happy to help a tarheel anyday.
 
Old 03-13-2009, 01:55 AM   #8
Rollo69
Member
 
Registered: Sep 2005
Location: Charlotte, NC
Distribution: Slack 12.0
Posts: 190

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by justwantin View Post
Sometimes I just back up and start from scratch ..... again. Then methodically work through the whole thing again one step at a time until it breaks or continues working correctly.

If I were you I'd run liloconfig and let slack make me a new simple lilo and install it to MBR and see if it all works with the default kernel. Then edit and add stanza and for another kernel and see if that works.
I did try running liloconfig and making a new lilo.conf and didn't work. I might as well try again. I just don't understand why /proc/partitions doesn't match /dev directory. I might just comment out the sata partition in fstab and see if that helps.

Also is there a way to update fstab??

Quote:
Sorry I can't be of more help but happy to help a tarheel anyday.
You couldn't be more true in saying that.. I am a true blue TARHEEL fan. But, not all Carolinians are unfortunately. Did you happen to see or hear about the Syracuse UConn game.. WOW 6 OT's and Syracuse won.

Thanks,
 
Old 03-13-2009, 02:10 AM   #9
Rollo69
Member
 
Registered: Sep 2005
Location: Charlotte, NC
Distribution: Slack 12.0
Posts: 190

Original Poster
Rep: Reputation: 30
One thing I do notice about /dev directory. There isn't a device name sda or sda1 but there is a hda and hda1. There is sda2 -sda15. I also commented out the /dev/sda3 from fstab. I'm still unsure about rebooting. I'll try running liloconfig later on today.
 
Old 03-13-2009, 08:22 AM   #10
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Rep: Reputation: 55
Don't specify a default in lilo. Maybe you have the syntax wrong. Let it give you a menu, and you choose which one to boot. Maybe this will boot the right kernel.

I don't know why you don't have an sda unless you messed up your partitioning. What do you get from fdisk -l? (that's a little L, not a number 1)
 
Old 03-13-2009, 10:08 AM   #11
Rollo69
Member
 
Registered: Sep 2005
Location: Charlotte, NC
Distribution: Slack 12.0
Posts: 190

Original Poster
Rep: Reputation: 30
Code:
# fdisk -l

Disk /dev/hda: 41.1 GB, 41110142976 bytes
255 heads, 63 sectors/track, 4998 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1         243     1951866   83  Linux
/dev/hda2             244         267      192780   82  Linux swap
/dev/hda3             268        4755    36049860   83  Linux
/dev/hda4            4756        4998     1951897+  83  Linux
Code:
# cat /proc/partitions
major minor  #blocks  name

   3     0   40146624 hda
   3     1    1951866 hda1
   3     2     192780 hda2
   3     3   36049860 hda3
   3     4    1951897 hda4
   8     0  488386584 sda
   8     1    4883728 sda1
   8     2     498015 sda2
   8     3  239256045 sda3
   8     4  243746212 sda4
I can go into sda4 partition and see what's on the drive even though fdisk -l doesn't show it. I used fdisk to partition the drive sda1 is "/', sda2 "swap" , sda3 "/usr" and sda4 "/xtra". I used ext3 for the file system. I even have Slack 12 loaded on it. I just haven't compiled kernel. I did a complete load of 12, not custom.

Thanks Randux,

Last edited by Rollo69; 03-13-2009 at 10:14 AM.
 
Old 03-13-2009, 03:03 PM   #12
justwantin
Member
 
Registered: Aug 2003
Location: Melbourne, Australia
Distribution: Slackware, Slackwarearm
Posts: 878

Rep: Reputation: 120Reputation: 120
For comparison this is what I get when I run fdisk -l. Note that there are there are details of both hda and sda partition schemes as well as drive details. Have you left out partr of your fdisk -l output or is that all you get when you run the command?

Quote:
root@rick:/home/rick# fdisk -l

Disk /dev/hda: 80.0 GB, 80026361856 bytes
16 heads, 63 sectors/track, 155061 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Disk identifier: 0x8f8000b1

Device Boot Start End Blocks Id System
/dev/hda1 * 1 23251 11718472+ c W95 FAT32 (LBA)
/dev/hda2 23252 38752 7812504 83 Linux
/dev/hda3 38753 120520 41211072 5 Extended
/dev/hda4 120521 155061 17408664 83 Linux
/dev/hda5 38753 40690 976720+ 82 Linux swap
/dev/hda6 40691 56191 7812472+ 83 Linux
/dev/hda7 56192 70142 7031272+ 83 Linux
/dev/hda8 70143 85643 7812472+ 83 Linux
/dev/hda9 85644 101144 7812472+ 83 Linux
/dev/hda10 101145 120520 9765472+ 83 Linux

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x22e3a813

Device Boot Start End Blocks Id System
/dev/sda1 * 1 30401 244196001 83 Linux
I may have missed it before, how many partitions are there supposed to be on the sata drive?

Do not be worried about re-booting. If lilo doesn't work you can use your install disk to boot your machine if it doesn't.
 
Old 03-13-2009, 03:21 PM   #13
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Hi,
Quote:
Originally Posted by Randux View Post
<snip>

lilo -v isn't a good way to install lilo. If you want to install lilo in the MBR, take the boot= line out of your lilo.conf and specify a drive on the command line:
The '-v' option to the lilo commands is just for verbosity. See 'man lilo'


Quote:
Originally Posted by Randux View Post
BTW you will boot alot faster if you use compact in your lilo.conf. Just add it on a line after lba32.
Quote:
excerpt from 'man lilo.conf'
compact
Tries to merge read requests for adjacent sectors into a single read request. This drastically reduces load time and keeps the map smaller. Using `compact' is especially recommended when booting from a floppy disk.
If you are using a boot floppy then of course use 'compact' but your not going to see that much of difference with todays modern equipment.

I like to use;

Code:
~#lilo -v -t -b /dev/hda      #test the lilo.conf for hda
~#lilo -v -b /dev/hda         #write the lilo to 'MBR'
 
Old 03-14-2009, 12:45 PM   #14
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Rep: Reputation: 55
Does anybody know why his sata drive doesn't show up in fdisk -l? That's not good.
 
Old 03-14-2009, 12:48 PM   #15
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Rep: Reputation: 55
Gary, what I meant by that when I said lilo -v isn't a good way to install lilo, is because I have seen it get messed up when there's more than one drive. Therefore I make a point never to specify a boot= parm in the conf, I specify -b on the command line (which I think you were the one who told me!). Also, I often run big multiboots and I write lilo to all the MBRs so I can still get to any system if one drive dies.
 
  


Reply

Tags
lilo



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
adding a new hard drive Kanly6486 Linux - Newbie 1 10-23-2006 04:38 AM
Adding in a second hard drive Transition Slackware 3 10-25-2005 05:57 PM
hard drive adding with lilo firestomper41 Mandriva 12 05-24-2004 04:19 PM
adding a hard drive Serena Linux - General 2 07-19-2003 05:39 PM
Adding Second Hard Drive Micro Linux - General 3 01-26-2003 09:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration