Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Can't boot from my SATA HD
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
enigma128
n00b
n00b


Joined: 28 Feb 2009
Posts: 9

PostPosted: Wed Mar 04, 2009 3:08 am    Post subject: Can't boot from my SATA HD Reply with quote

The BIOS on my fileserver is apparently too old to boot from a PCI SATA expansion card. The drive already has Gentoo on it, with SATA support added to the kernel. I used TAR with permission preservation to copy all files from an IDE drive that was on its way out (and is no longer recognized). Then I used the Gentoo install CD to chroot into the SATA drive and install GRUB to the MBR (changing hda to sda where needed), and modified the fstab as well.

***
Is there a way to make a floppy disk with a bootloader on it, to boot from this hard drive? I was going to attempt this via the install disk, but it doesn't seem to recognize my floppy drive. I don't see /dev/floppy or /dev/fd0. But I'm able to boot into an old W98 floppy, so the drive is working properly.
***

I tried the "Boot from first HD" option on the Kubuntu LIVECD, and it goes to the GRUB menu on the SATA HD, but then I get something like this from the kernel:
Code:
VFS: Cannot open root device "sda1" or unknown-block(0,0)
Please append a correct "root=" boot option...
Kernel Panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

So maybe SATA support isn't properly done, but I'll worry about that later, after I can automatically boot the HD.

I have a laptop with Gentoo on it, and a USB floppy drive to work with if needed.
Back to top
View user's profile Send private message
pappy_mcfae
Watchman
Watchman


Joined: 27 Dec 2007
Posts: 5999
Location: Pomona, California.

PostPosted: Wed Mar 04, 2009 7:47 am    Post subject: Reply with quote

Make a grub boot disk CD if that's the only way. I think, however, you have other problems. How old is "old"? I had a P-II server running with a PCI SATA card, SiS, I believe. You probably need proper kernel. Send your current .config, the results of lspci -n and /etc/fstab, and I'll see what I can do about whipping you up a functional kernel.

Blessed be!
Pappy
_________________
This space left intentionally blank, except for these ASCII symbols.
Back to top
View user's profile Send private message
enigma128
n00b
n00b


Joined: 28 Feb 2009
Posts: 9

PostPosted: Thu Mar 05, 2009 4:18 am    Post subject: Reply with quote

Pappy, here's my .config
http://pastebin.com/m4be4ff24

I configured it by hand with menuconfig, but I don't claim to be an expert.
It's fairly minimal, because this box usually sits on a shelf with just an ethernet cable plugged in.
I did take lspci into consideration when I built the config. It worked flawlessly with the IDE drive for about 1 year.

How do I make a grub boot disk CD? Can you point me to a guide? The server doesn't have an RW drive; would I be able to make an image and burn it to CD with another machine? The boot disk needs to work without user intervention. The methods I found via Google required user intervention.
It's a 2.6-ishGHz P4-Celeron, but the motherboard has a dumbed-down OEM BIOS, that doesn't have the capability to boot from USB or PCI devices (though it recognizes them).

lspci
Code:
00:00.0 Host bridge: Intel Corporation 82845G/GL[Brookdale-G]/GE/PE DRAM Controller/Host-Hub Interface (rev 03)
00:02.0 VGA compatible controller: Intel Corporation 82845G/GL[Brookdale-G]/GE Chipset Integrated Graphics Device (rev 03)
00:1d.0 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #3 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Controller (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 82)
00:1f.0 ISA bridge: Intel Corporation 82801DB/DBL (ICH4/ICH4-L) LPC Interface Bridge (rev 02)
00:1f.1 IDE interface: Intel Corporation 82801DB (ICH4) IDE Controller (rev 02)
00:1f.3 SMBus: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) SMBus Controller (rev 02)
00:1f.5 Multimedia audio controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller (rev 02)
01:09.0 RAID bus controller: VIA Technologies, Inc. VT6421 IDE RAID Controller (rev 50)
01:0b.0 Communication controller: Conexant HSF 56k Data/Fax Modem
01:0d.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)


lspci -n
Code:
00:00.0 0600: 8086:2560 (rev 03)
00:02.0 0300: 8086:2562 (rev 03)
00:1d.0 0c03: 8086:24c2 (rev 02)
00:1d.1 0c03: 8086:24c4 (rev 02)
00:1d.2 0c03: 8086:24c7 (rev 02)
00:1d.7 0c03: 8086:24cd (rev 02)
00:1e.0 0604: 8086:244e (rev 82)
00:1f.0 0601: 8086:24c0 (rev 02)
00:1f.1 0101: 8086:24cb (rev 02)
00:1f.3 0c05: 8086:24c3 (rev 02)
00:1f.5 0401: 8086:24c5 (rev 02)
01:09.0 0104: 1106:3249 (rev 50)
01:0b.0 0780: 14f1:2f20
01:0d.0 0200: 10ec:8139 (rev 10)


grub.conf
Code:
# Boot automatically after 3 secs.
timeout 3

# Boot the first entry by default, fallback to the second entry.
default 0
#fallback 1

#Ignore TSC Clocksource to prevent hang on kernel boot
clocksource=acpi_pm

# Splash image to show behind grub.
#splashimage=(hd0,0)/boot/grub/splash.xpm.gz

# For booting Gentoo
title Gentoo Linux
root (hd0,0)
kernel /boot/kernel root=/dev/sda1 vga=0x317


fstab
Code:
# <fs>         <mountpoint>   <type>      <opts>         <dump/pass>
/dev/sda1      /      ext3      noatime         0 1
/dev/cdrom      /mnt/cdrom   auto      noauto,ro,users      0 0
/dev/fd0      /mnt/floppy   auto      noauto         0 0

/swap.img      none      swap      sw         0 0
shm         /dev/shm   tmpfs      nodev,nosuid,noexec   0 0
proc         /proc      proc      defaults      0 0


make.conf
Code:
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j2"

USE="aac aalib acl acpi alsa apache2 apm automount caps cdr cdparanoia clamav crypt cups dbus dri dga dvd dvdr dvdread
encode exif fbcon ffmpeg firefox flac ftp gd gdbm geoip gif -gnome -gtk gstreamer hal ipv6 java javascript
jpeg -kde libnotify loop-aes mad mmx mp3 mpeg mysql mysqli nas network nocd nsplugin ogg opengl pdf perl
php png python qt3 qt3support qt4 quicktime rdesktop readline real samba snmp spell sse sse2 ssl svga
tiff tokenizer truetype unicode usb vcd videos vnc wma win32codecs X xfce xine xosd xprint xv xvid zlib"

FEATURES="parallel-fetch"
INPUT_DEVICES="keyboard mouse"
VIDEO_CARDS="i810"

GENTOO_MIRRORS="http://gentoo.osuosl.org/ ftp://ftp.gtlib.gatech.edu/pub/gentoo ftp://ftp.ussg.iu.edu/pub/linux/gentoo "
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"


world
Code:
app-admin/gkrellm
app-admin/sudo
app-admin/syslog-ng
app-antivirus/clamav
app-dicts/aspell-en
app-misc/screen
app-portage/gentoolkit
dev-db/mysql
dev-lang/php
dev-util/ccache
net-dns/noip-updater
net-fs/mount-cifs
net-fs/samba
net-ftp/pure-ftpd
net-misc/dhcpcd
net-misc/netkit-fingerd
net-misc/ntp
net-misc/xrdp
net-print/cups
net-www/netscape-flash
sys-apps/dbus
sys-apps/hal
sys-apps/pciutils
sys-apps/usbutils
sys-boot/grub
sys-kernel/gentoo-sources
sys-kernel/module-rebuild
www-client/links
www-client/mozilla-firefox
www-servers/apache
x11-themes/gkrellm-themes
xfce-base/xfce4
Back to top
View user's profile Send private message
enigma128
n00b
n00b


Joined: 28 Feb 2009
Posts: 9

PostPosted: Thu Mar 05, 2009 5:11 am    Post subject: Reply with quote

For some reason the Gentoo install CD doesn't see my internal floppy drive. I was able to symlink my USB floppy drive (sdc) to /dev/fd0, and followed this guide. I put this floppy in the internal floppy drive, and it boots a grub prompt.
What can I do to make it boot the lines in grub.conf without user intervention?

(EDIT)
I entered these lines:
Code:
root (hd0,0)
kernel /boot/kernel root=/dev/sda1
boot

And it starts to boot the kernel, but I still get a panic error.
http://img.photobucket.com/albums/v354/ahf123/kernel_panic.jpg
Now I just need to get this to happen without user intervention, and then take a look into fixing the kernel with proper SATA support. It doesn't look like the kernel can read from the SATA drive. I'm thinking I didn't actually enable SATA support, just SCSI; and I didn't decend into the "Serial ATA (prod) and Parallel ATA (experimental) drivers" tree, namely the "AHCI SATA support (NEW)" option, because I don't see "CONFIG_SATA_AHCI=y" in my .config file.

Pappy, even though lspci says:
Code:
01:09.0 RAID bus controller: VIA Technologies, Inc. VT6421 IDE RAID Controller (rev 50)

that card has two SATA ports on it.
Back to top
View user's profile Send private message
enigma128
n00b
n00b


Joined: 28 Feb 2009
Posts: 9

PostPosted: Thu Mar 05, 2009 6:48 am    Post subject: Reply with quote

Aha! It lives!

I chrooted into the SATA drive using the Gentoo install CD again, manually mounted the important stuff from my fstab (swap, proc, shm), and recompiled the kernel, adding proper support for SATA, AHCI, and VIA SATA chipsets (under the "Serial ATA (prod) and Parallel ATA (experimental) drivers" tree).

Now it boots fine, but I still have to enter those commands manually at the Grub prompt (on the floppy), so it's not ready to go back on the shelf just yet. I'll be looking into that now. Or maybe someone can offer some advice.

Pappy, here's my new .config, in case you still want to see it or can still work some magic with it:
http://pastebin.com/m79e7a04a
Back to top
View user's profile Send private message
pappy_mcfae
Watchman
Watchman


Joined: 27 Dec 2007
Posts: 5999
Location: Pomona, California.

PostPosted: Thu Mar 05, 2009 7:12 am    Post subject: Reply with quote

No, unless you want me to give it the Pappy treatment, the fact that you have it going is a good thing. I'd hate to take that thrill away. Of course, if you want....

Blessed be!
Pappy
_________________
This space left intentionally blank, except for these ASCII symbols.
Back to top
View user's profile Send private message
enigma128
n00b
n00b


Joined: 28 Feb 2009
Posts: 9

PostPosted: Thu Mar 05, 2009 8:54 am    Post subject: Reply with quote

Nah, I'd hate to be a burden if there's no longer a problem with it.
I think I've done a fairly decent job with it. I mean, it works for everything I need it to do.
Gentoo documentation is pretty top-notch on the subject.

I don't know why the install CD doesn't see my floppy drive, because I can probe/mount it from my running system. :roll:
Not that big of a deal, just a minor annoyance. The CD really proved to be an invaluable tool for this task.
Back to top
View user's profile Send private message
pappy_mcfae
Watchman
Watchman


Joined: 27 Dec 2007
Posts: 5999
Location: Pomona, California.

PostPosted: Thu Mar 05, 2009 9:00 am    Post subject: Reply with quote

If you're happy, I'm happy. Happy Gentooing!

Blessed be!
Pappy

EDIT You can also look at my kernel seeds. The settings I use give you maximum performance, if you feel the need. That's allowed. hehehe/EDIT
_________________
This space left intentionally blank, except for these ASCII symbols.
Back to top
View user's profile Send private message
enigma128
n00b
n00b


Joined: 28 Feb 2009
Posts: 9

PostPosted: Thu Mar 05, 2009 9:30 am    Post subject: Reply with quote

I did have a look around your site. I will definitely bookmark it for future referrence.
For now I'm going to leave my kernels alone and play with the xorg.conf on my laptop to get my external monitor working correctly.

As for booting Grub from the floppy, I think there is a slight error in that guide I linked to before. I had to:
Code:
cd /mnt/floppy/boot/grub && cp grub.conf menu.lst

because the symlink menu.lst was not copied, probably due to FS limitations.

Now it should boot Grub from the floppy and load the kernel/system from my SATA drive automatically.
I will know as soon as my compiles are finished and I can reboot the system.
Then it's back to the shelf!

[SOLVED]
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum