0

I have Debian Squeeze installed on a compact flash card in ATA port. I copied the whole system to SATA drive but system holds in initramfs because can't mount root file system. I know that my system don't have support for SATA drives - I don't see any /dev/sd[abc] devices. How can I install SATA drivers? I suppose that I need iscsi_mod driver but I can't find informations about installing it.

uname -a
Linux server 2.6.32-2 #1 Thu May 24 10:52:21 CEST 2012 i686 GNU/Linux

lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 6.0.10 (squeeze)
Release:    6.0.10
Codename:   squeeze 

-

cat /proc/modules 
tcp_diag 596 0 - Live 0xe0716000
inet_diag 5584 1 tcp_diag, Live 0xe070c000
cls_flow 4642 324 - Live 0xe17c5000
sch_sfq 3810 432 - Live 0xe17ba000
cls_u32 4436 326 - Live 0xe17af000
cls_fw 2611 2 - Live 0xe17a4000
sch_htb 9947 2 - Live 0xe1798000
xt_mark 613 2 - Live 0xe1441000
xt_MARK 617 5 - Live 0xe0e62000
ip_set_nethash 4264 1 - Live 0xe0e46000
ipt_set 920 6 - Live 0xe0e20000
ip_set_macipmap 2375 1 - Live 0xe0d88000
xt_IMQ 827 2 - Live 0xe0d3c000
ipt_LOG 3510 1 - Live 0xe0cdb000
xt_limit 1064 1 - Live 0xe0cd1000
xt_multiport 1771 2 - Live 0xe0cc4000
xt_state 919 6 - Live 0xe0c5a000
xt_tcpudp 1727 46 - Live 0xe0c48000
ip_set 8786 5 ip_set_nethash,ipt_set,ip_set_macipmap, Live 0xe0bfc000
iptable_raw 1467 0 - Live 0xe0bce000
iptable_filter 1786 1 - Live 0xe0bbb000
iptable_nat 3499 1 - Live 0xe0ba8000
iptable_mangle 2333 1 - Live 0xe0b94000
ip_tables 7187 4 iptable_raw,iptable_filter,iptable_nat,iptable_mangle,                   Live 0xe0b89000
x_tables 8181 11     xt_mark,xt_MARK,ipt_set,xt_IMQ,ipt_LOG,xt_limit,xt_multiport,xt_state,xt_tcpu    dp,iptable_nat,ip_tables, Live 0xe0b7b000
imq 2481 0 - Live 0xe0b6d000
ext2 43919 1 - Live 0xe0b50000
nf_nat_ftp 1427 0 - Live 0xe0b36000
nf_nat 10236 2 iptable_nat,nf_nat_ftp, Live 0xe0b29000
nf_conntrack_ipv4 7417 9 iptable_nat,nf_nat, Live 0xe0b19000
nf_defrag_ipv4 759 1 nf_conntrack_ipv4, Live 0xe0b0c000
nf_conntrack_ftp 4120 1 nf_nat_ftp, Live 0xe0b02000
nf_conntrack 36092 6         xt_state,iptable_nat,nf_nat_ftp,nf_nat,nf_conntrack_ipv4,nf_conntrack_ftp,     Live 0xe0ae9000
loop 9449 0 - Live 0xe0acb000
uhci_hcd 15082 0 - Live 0xe0a90000
ehci_hcd 24437 0 - Live 0xe0a7b000
e100 21469 0 - Live 0xe0a3a000
mii 2702 1 e100, Live 0xe0a1c000
evdev 5338 2 - Live 0xe0a0b000
shpchp 21040 0 - Live 0xe09f9000
parport_pc 15541 0 - Live 0xe09c9000
parport 21997 1 parport_pc, Live 0xe09a4000
rtc_cmos 6063 0 - Live 0xe0990000
floppy 38956 0 - Live 0xe0978000
usbcore 92562 3 uhci_hcd,ehci_hcd, Live 0xe093f000
psmouse 31992 0 - Live 0xe0906000
pcspkr 1175 0 - Live 0xe08f1000
nls_base 4433 1 usbcore, Live 0xe08d8000
rng_core 2214 0 - Live 0xe08cd000
processor 17905 0 - Live 0xe08be000
button 3546 0 - Live 0xe08ad000
pci_hotplug 18035 1 shpchp, Live 0xe089c000
ext3 89927 1 - Live 0xe0870000
jbd 26599 1 ext3, Live 0xe083d000
mbcache 3488 2 ext2,ext3, Live 0xe0828000
ide_cd_mod 20776 0 - Live 0xe0817000
ide_gd_mod 16615 4 - Live 0xe0801000
cdrom 25921 1 ide_cd_mod, Live 0xe07ea000
ata_generic 2007 0 - Live 0xe07d8000
ata_piix 16941 0 - Live 0xe07c8000
libata 102152 2 ata_generic,ata_piix, Live 0xe0793000
piix 3540 3 - Live 0xe075f000
thermal 9183 0 - Live 0xe0751000
ide_core 57412 3 ide_cd_mod,ide_gd_mod,piix, Live 0xe072d000
thermal_sys 8391 2 processor,thermal, Live 0xe0707000
  • Where do you get stuck? Are you in BusyBox? – Konrad Gajewski May 13 '15 at 19:02
  • Yes in BusyBox, root file system can not be mounted because of missing drivers for SATA devices. I don't have any /dev/sdx devices. When system is running normally on flash card it can't detects SATA devices also. – exxon May 13 '15 at 19:37
  • List all the modules loaded. – Konrad Gajewski May 13 '15 at 20:06
  • You can see loaded modules when system is running above. – exxon May 13 '15 at 20:27
  • You need to ensure the SATA driver is copied to the initramfs. You can do this with the initramfs-tools package. – Matt May 13 '15 at 20:44
0

Sata drivers come by default with debian squeeze's kernel images, unless you told it at the time to only include the needed drivers when the initramfs was being built, and there was no sata hardware in the system. It's a question that gets asked I believe during initial install of the OS. If you would not have included most modules but opted for the smaller initramfs the sata driver may not have been included.

The easiest solution would be to boot the system of a cdrom or such, in rescue mode, then rebuild the initramfs for the kernel(s) of the OS on the flash card. You could re-install the kernel, assuming your kernel package is called linux-image-2.6.32-5-amd64:

apt-get --reinstall install linux-image-2.6.32-5-amd64

In order to by default allow most modules to be built in change the following option in /etc/initramfs-tools/initramfs.conf:

MODULES=most

You can run update-initramfs for such changes to take effect. If in rescue mode run it after chroot-ing into the OS. The rescue mode has a menu option for that.

| improve this answer | |
  • Hi, Thank You for answer - can I build module from linux-headers-2.6.32-5-686? for sata support? – exxon May 18 '15 at 20:06
  • You don't need to build the module, it already comes as part of the standard debian kernel and module packages. All you need to do is to make sure that the module is built into kernel initramfs used to boot the system. – aseq May 19 '15 at 0:45
  • My Kernel 2.6.32-2 is customised and I don't have the source code so I can't reinstall the kernel - I need to find another way. – exxon May 19 '15 at 12:18
  • Unfortunately that question requires a whole new serverfault entry. But installing kernel-package should pull in all you need.Then get a kernel source which is 2.6.32.X and compile it. Then find the module you need from the freshly built kernel and place it in the correct location (/lib/modules/*) for your existing kernel. That should do the trick. – aseq May 19 '15 at 22:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.