LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 06-28-2007, 12:26 PM   #1
bioe007
Member
 
Registered: Apr 2006
Location: lynnwood, wa - usa
Distribution: archlinux
Posts: 654

Rep: Reputation: 30
Question mkinitrd trouble, can't mount /dev/sda9 on /mnt


I am goofing around with my kernel again, trying to figure out how to really use mkinitrd.

my system: dell d820 (laptop), intel core duo, sata (ICH7), i945GM

this is how I'm trying to do it:
Code:
mkinitrd  -c -k 2.6.20.14 -f reiserfs -r /dev/sda9 -m $(cat /usr/src/linux/modules_app.crnt)
where my file 'modules_app.crnt' is:
Code:
ts_kmp:ts_fsm:ts_bm:vfat:ntfs:msdos:lockd:isofs:fat:exportfs:autofs4:pcmcia:i2o_core:i2c-core:freq_table:rng-core:acpi-cpufreq
using this i do not get the infamous 'kernel panic' but I think nearly so, the last message I see is something about:

Quote:
Originally Posted by kernel
can't mount /dev/sda9 on /mnt
trouble ahead..
seriously, it says "trouble ahead"

then the system stops at a '#' prompt where I can type, but have only a few commands. 'ls' shows a few different things.

from that prompt I tried:
Code:
#mount /dev/sda9 /
error: /proc/filesystems : no such thing
these are obviously not the exact error messages, but I don't know how I can capture them from the prompt I'm given.

I'm wondering if there is some module I'm supposed to add to the initrd? reiserfs is compiled into the bzImage (in fact all the 'important' file systems are)

I also notice a lot of unresolved symbols from the kernel as it is insmod'ing things.

any tips? thanks!
 
Old 06-28-2007, 12:28 PM   #2
bioe007
Member
 
Registered: Apr 2006
Location: lynnwood, wa - usa
Distribution: archlinux
Posts: 654

Original Poster
Rep: Reputation: 30
forgot, here are all the things I built as modules:

Code:
# ls -R /lib/modules/2.6.20.14/kernel/
/lib/modules/2.6.20.14/kernel/:
arch  crypto  drivers  fs  lib  net  sound

/lib/modules/2.6.20.14/kernel/arch:
i386

/lib/modules/2.6.20.14/kernel/arch/i386:
kernel

/lib/modules/2.6.20.14/kernel/arch/i386/kernel:
cpu

/lib/modules/2.6.20.14/kernel/arch/i386/kernel/cpu:
cpufreq

/lib/modules/2.6.20.14/kernel/arch/i386/kernel/cpu/cpufreq:
acpi-cpufreq.ko  p4-clockmod.ko  speedstep-lib.ko

/lib/modules/2.6.20.14/kernel/crypto:
ecb.ko  sha256.ko

/lib/modules/2.6.20.14/kernel/drivers:
acpi  block  char  cpufreq  crypto  dma  hwmon  i2c  ieee1394  input  message  net  parport  pcmcia  scsi  serial  usb  video

/lib/modules/2.6.20.14/kernel/drivers/acpi:
dock.ko

/lib/modules/2.6.20.14/kernel/drivers/block:
floppy.ko  pktcdvd.ko

/lib/modules/2.6.20.14/kernel/drivers/char:
agp  drm  hw_random  i8k.ko  lp.ko  ppdev.ko  rtc.ko

/lib/modules/2.6.20.14/kernel/drivers/char/agp:
agpgart.ko  intel-agp.ko

/lib/modules/2.6.20.14/kernel/drivers/char/drm:
drm.ko  i915.ko

/lib/modules/2.6.20.14/kernel/drivers/char/hw_random:
intel-rng.ko  rng-core.ko

/lib/modules/2.6.20.14/kernel/drivers/cpufreq:
cpufreq_conservative.ko  freq_table.ko

/lib/modules/2.6.20.14/kernel/drivers/crypto:
geode-aes.ko

/lib/modules/2.6.20.14/kernel/drivers/dma:
ioatdma.ko

/lib/modules/2.6.20.14/kernel/drivers/hwmon:
abituguru.ko  adm1031.ko  ds1621.ko   gl518sm.ko    it87.ko    lm77.ko  lm85.ko  max1619.ko  smsc47b397.ko  w83627hf.ko  w83793.ko
adm1021.ko    adm9240.ko  f71805f.ko  gl520sm.ko    k8temp.ko  lm78.ko  lm87.ko  pc87360.ko  smsc47m1.ko    w83781d.ko   w83l785ts.ko
adm1025.ko    asb100.ko   fscher.ko   hwmon-vid.ko  lm63.ko    lm80.ko  lm90.ko  pc87427.ko  smsc47m192.ko  w83791d.ko
adm1026.ko    atxp1.ko    fscpos.ko   hwmon.ko      lm75.ko    lm83.ko  lm92.ko  sis5595.ko  w83627ehf.ko   w83792d.ko

/lib/modules/2.6.20.14/kernel/drivers/i2c:
algos  busses  i2c-core.ko  i2c-dev.ko

/lib/modules/2.6.20.14/kernel/drivers/i2c/algos:
i2c-algo-bit.ko  i2c-algo-pca.ko  i2c-algo-pcf.ko

/lib/modules/2.6.20.14/kernel/drivers/i2c/busses:
i2c-i801.ko  i2c-isa.ko  i2c-piix4.ko

/lib/modules/2.6.20.14/kernel/drivers/ieee1394:
ieee1394.ko  ohci1394.ko  raw1394.ko

/lib/modules/2.6.20.14/kernel/drivers/input:
serio

/lib/modules/2.6.20.14/kernel/drivers/input/serio:
serio_raw.ko  serport.ko

/lib/modules/2.6.20.14/kernel/drivers/message:
i2o

/lib/modules/2.6.20.14/kernel/drivers/message/i2o:
i2o_bus.ko  i2o_config.ko  i2o_core.ko  i2o_proc.ko

/lib/modules/2.6.20.14/kernel/drivers/net:
dummy.ko  tg3.ko

/lib/modules/2.6.20.14/kernel/drivers/parport:
parport.ko  parport_cs.ko  parport_pc.ko  parport_serial.ko

/lib/modules/2.6.20.14/kernel/drivers/pcmcia:
pcmcia.ko  rsrc_nonstatic.ko  yenta_socket.ko

/lib/modules/2.6.20.14/kernel/drivers/scsi:
sd_mod.ko  sg.ko

/lib/modules/2.6.20.14/kernel/drivers/serial:
serial_cs.ko

/lib/modules/2.6.20.14/kernel/drivers/usb:
class  host  serial  storage

/lib/modules/2.6.20.14/kernel/drivers/usb/class:
usblp.ko

/lib/modules/2.6.20.14/kernel/drivers/usb/host:
ehci-hcd.ko  uhci-hcd.ko

/lib/modules/2.6.20.14/kernel/drivers/usb/serial:
pl2303.ko  usbserial.ko

/lib/modules/2.6.20.14/kernel/drivers/usb/storage:
usb-storage.ko

/lib/modules/2.6.20.14/kernel/drivers/video:
backlight  intelfb

/lib/modules/2.6.20.14/kernel/drivers/video/backlight:
backlight.ko  lcd.ko

/lib/modules/2.6.20.14/kernel/drivers/video/intelfb:
intelfb.ko

/lib/modules/2.6.20.14/kernel/fs:
autofs4  cifs  exportfs  fat  isofs  lockd  msdos  nfs  nfsd  ntfs  smbfs  vfat

/lib/modules/2.6.20.14/kernel/fs/autofs4:
autofs4.ko

/lib/modules/2.6.20.14/kernel/fs/cifs:
cifs.ko

/lib/modules/2.6.20.14/kernel/fs/exportfs:
exportfs.ko

/lib/modules/2.6.20.14/kernel/fs/fat:
fat.ko

/lib/modules/2.6.20.14/kernel/fs/isofs:
isofs.ko

/lib/modules/2.6.20.14/kernel/fs/lockd:
lockd.ko

/lib/modules/2.6.20.14/kernel/fs/msdos:
msdos.ko

/lib/modules/2.6.20.14/kernel/fs/nfs:
nfs.ko

/lib/modules/2.6.20.14/kernel/fs/nfsd:
nfsd.ko

/lib/modules/2.6.20.14/kernel/fs/ntfs:
ntfs.ko

/lib/modules/2.6.20.14/kernel/fs/smbfs:
smbfs.ko

/lib/modules/2.6.20.14/kernel/fs/vfat:
vfat.ko

/lib/modules/2.6.20.14/kernel/lib:
libcrc32c.ko  ts_bm.ko  ts_fsm.ko  ts_kmp.ko

/lib/modules/2.6.20.14/kernel/net:
ipv4  ipv6  netfilter  sunrpc

/lib/modules/2.6.20.14/kernel/net/ipv4:
ah4.ko   inet_diag.ko  ipip.ko    tcp_diag.ko  xfrm4_mode_beet.ko       xfrm4_mode_tunnel.ko
esp4.ko  ipcomp.ko     netfilter  tunnel4.ko   xfrm4_mode_transport.ko  xfrm4_tunnel.ko

/lib/modules/2.6.20.14/kernel/net/ipv4/netfilter:
ip_tables.ko   ipt_REDIRECT.ko  ipt_TOS.ko       ipt_tos.ko         iptable_mangle.ko  nf_conntrack_ipv4.ko  nf_nat_irc.ko
ipt_LOG.ko     ipt_SAME.ko      ipt_addrtype.ko  ipt_ttl.ko         iptable_nat.ko     nf_nat.ko             nf_nat_tftp.ko
ipt_NETMAP.ko  ipt_TCPMSS.ko    ipt_iprange.ko   iptable_filter.ko  iptable_raw.ko     nf_nat_ftp.ko

/lib/modules/2.6.20.14/kernel/net/ipv6:
ah6.ko   ipcomp6.ko  netfilter  tunnel6.ko          xfrm6_mode_transport.ko  xfrm6_tunnel.ko
esp6.ko  ipv6.ko     sit.ko     xfrm6_mode_beet.ko  xfrm6_mode_tunnel.ko

/lib/modules/2.6.20.14/kernel/net/ipv6/netfilter:
ip6_tables.ko  ip6t_REJECT.ko  ip6t_ipv6header.ko  ip6table_filter.ko  ip6table_raw.ko
ip6t_LOG.ko    ip6t_frag.ko    ip6t_rt.ko          ip6table_mangle.ko  nf_conntrack_ipv6.ko

/lib/modules/2.6.20.14/kernel/net/netfilter:
nf_conntrack.ko      nf_conntrack_proto_sctp.ko  nfnetlink_log.ko    xt_comment.ko    xt_length.ko   xt_sctp.ko    xt_tcpudp.ko
nf_conntrack_ftp.ko  nf_conntrack_tftp.ko        nfnetlink_queue.ko  xt_conntrack.ko  xt_pkttype.ko  xt_string.ko
nf_conntrack_irc.ko  nfnetlink.ko                x_tables.ko         xt_hashlimit.ko  xt_policy.ko   xt_tcpmss.ko

/lib/modules/2.6.20.14/kernel/net/sunrpc:
auth_gss  sunrpc.ko

/lib/modules/2.6.20.14/kernel/net/sunrpc/auth_gss:
auth_rpcgss.ko  rpcsec_gss_krb5.ko

/lib/modules/2.6.20.14/kernel/sound:
core  drivers  pci  soundcore.ko

/lib/modules/2.6.20.14/kernel/sound/core:
oss  seq  snd-page-alloc.ko  snd-pcm.ko  snd-rawmidi.ko  snd-rtctimer.ko  snd-timer.ko  snd.ko

/lib/modules/2.6.20.14/kernel/sound/core/oss:
snd-mixer-oss.ko  snd-pcm-oss.ko

/lib/modules/2.6.20.14/kernel/sound/core/seq:
oss  snd-seq-device.ko  snd-seq-midi-event.ko  snd-seq-midi.ko  snd-seq.ko

/lib/modules/2.6.20.14/kernel/sound/core/seq/oss:
snd-seq-oss.ko

/lib/modules/2.6.20.14/kernel/sound/drivers:
mpu401  snd-dummy.ko  snd-serial-u16550.ko

/lib/modules/2.6.20.14/kernel/sound/drivers/mpu401:
snd-mpu401-uart.ko  snd-mpu401.ko

/lib/modules/2.6.20.14/kernel/sound/pci:
hda

/lib/modules/2.6.20.14/kernel/sound/pci/hda:
snd-hda-codec.ko  snd-hda-intel.ko
 
Old 06-30-2007, 10:40 PM   #3
skog
Member
 
Registered: Sep 2003
Location: TX
Distribution: slackware
Posts: 301

Rep: Reputation: 30
you got /proc filesystem and /sys filesystem built into your kernel? i dont see them listed as modules. They arent in the filesystem area... sorry forget where but you need them. grep your kernel save file.

sounds like you got a bad kernel build you left out something important.
 
Old 07-01-2007, 02:21 PM   #4
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
Sounds to me like you have a bad entry in your fstab for starters. init should be trying to mount /dev/sda9 on '/' not '/mnt'.
 
Old 07-02-2007, 10:08 AM   #5
bioe007
Member
 
Registered: Apr 2006
Location: lynnwood, wa - usa
Distribution: archlinux
Posts: 654

Original Poster
Rep: Reputation: 30
thanks for the replies.

@ skog - PROC_FS and SYSFS from my .config:
Code:
$ cat .config | grep SYSFS
# CONFIG_SYSFS_DEPRECATED is not set
# CONFIG_PM_SYSFS_DEPRECATED is not set
# CONFIG_RTC_INTF_SYSFS is not set
CONFIG_SYSFS=y
$ cat .config | grep PROC_FS
# CONFIG_SCSI_PROC_FS is not set  
CONFIG_PROC_FS=y
@gnashley - my fstab:
Code:
$ cat /etc/fstab 
/dev/sda6        swap             swap        defaults         0   0
/dev/sda9        /                reiserfs    defaults         1   1
/dev/sda10       /home            ext3        defaults         1   2
/dev/sda3        /boot            ext2        owner,rw         1   2
/dev/sda7        /usr             reiserfs    defaults         1   2
/dev/sda8        /opt             reiserfs    defaults         1   2

/dev/sda2        /mnt/win         ntfs          ro,users       1   0
/dev/sda5        /mnt/vfat      vfat            umask=0000     1   0

/dev/sdb1       /media/usb1     auto            rw,users        1 0

/dev/cdrom      /media/cdrom0    auto           noauto,users,owner,ro  0   0

devpts           /dev/pts         devpts      gid=5,mode=620   0   0
proc             /proc            proc        defaults         0   0
what is running now:
Code:
$ lsmod
Module                  Size  Used by
ndiswrapper           169512  0 
tg3                   101384  0 
thermal                13772  3 
i915                   19520  1 
drm                    64476  2 i915
ipv6                  217120  12 
snd_seq_oss            27136  0 
snd_seq_midi_event      5568  1 snd_seq_oss
snd_seq                42288  4 snd_seq_oss,snd_seq_midi_event
snd_seq_device          5900  2 snd_seq_oss,snd_seq
snd_pcm_oss            35136  0 
snd_mixer_oss          13376  2 snd_pcm_oss
xt_limit                2176  2 
xt_pkttype              1664  1 
xt_tcpudp               3072  30 
ipt_LOG                 5376  11 
xt_state                1984  6 
iptable_mangle          2176  0 
iptable_nat             5764  0 
iptable_filter          2308  1 
nf_conntrack_irc        5668  0 
nf_nat_ftp              2820  0 
nf_nat                 14252  2 iptable_nat,nf_nat_ftp
nf_conntrack_ftp        7840  1 nf_nat_ftp
nf_conntrack_ipv4      12876  8 iptable_nat
nf_conntrack           45896  7 xt_state,iptable_nat,nf_conntrack_irc,nf_nat_ftp,nf_nat,nf_conntrack_ftp,nf_conntrack_ipv4
nfnetlink               4824  3 nf_nat,nf_conntrack_ipv4,nf_conntrack
ip_tables               9756  3 iptable_mangle,iptable_nat,iptable_filter
x_tables               11012  7 xt_limit,xt_pkttype,xt_tcpudp,ipt_LOG,xt_state,iptable_nat,ip_tables
ppdev                   7108  0 
i8k                     5352  1 
parport_cs              3780  1 
parport_pc             29412  1 parport_cs
parport                29064  2 ppdev,parport_pc
snd_hda_intel          16248  1 
snd_hda_codec         151472  1 snd_hda_intel
yenta_socket           22108  3 
snd_pcm                57612  3 snd_pcm_oss,snd_hda_intel,snd_hda_codec
intel_agp              19612  1 
ohci1394               29300  0 
rsrc_nonstatic         10572  1 yenta_socket
snd_timer              17672  2 snd_seq,snd_pcm
serio_raw               5124  0 
agpgart                25868  3 drm,intel_agp
i2c_i801                6668  0 
ehci_hcd               25624  0 
sg                     20196  0 
snd                    39972  9 snd_seq_oss,snd_seq,snd_seq_device,snd_pcm_oss,snd_mixer_oss,snd_hda_intel,snd_hda_codec,snd_pcm,snd_timer
snd_page_alloc          7112  2 snd_hda_intel,snd_pcm
ieee1394               78364  1 ohci1394
uhci_hcd               19284  0 
acpi_cpufreq            7068  1 
ac                      3844  2 
battery                 8644  3 
button                  6096  0 
container               3584  0 
fan                     3780  0 
processor              31748  2 thermal,acpi_cpufreq
video                  15684  0 
freq_table              3464  1 acpi_cpufreq
ioatdma                 7360  0 [unsafe]
i2c_core               16256  1 i2c_i801
pcmcia                 28780  1 parport_cs
pcmcia_core            31872  4 parport_cs,yenta_socket,rsrc_nonstatic,pcmcia
cfbimgblt               2624  0 
cfbfillrect             3264  0 
cfbcopyarea             3456  0 
fb                     39496  0
this little distraction started because I finally got around to learning something about iptables and firewall stuff. then I thought, 'well how much do I know about what is reallly needed in my kernel.' So I was going to make like everything modular.

So I am running right now the 'same' kernel but with fs and sata drivers built in. it seems to be OK.

One more thing I notice is that when I boot the initrd.gz version it says (before the line about /dev/sda9 on /mnt)
"cannot mount root fs, unknown filetype, tried: "

and blank, like it has tried nothing.

edit
btw- I have also "progressed" to the normal 'kernel panic' message...

Last edited by bioe007; 07-02-2007 at 01:42 PM.
 
Old 07-05-2007, 10:57 AM   #6
bioe007
Member
 
Registered: Apr 2006
Location: lynnwood, wa - usa
Distribution: archlinux
Posts: 654

Original Poster
Rep: Reputation: 30
bump

ok, after being distracted by the shiny new slack12 release (and installing on a different laptop) I'm back to this problem and hoping some fellow slacker can help me out.

distro=slack11
kernel=2.6.20.14

problem kernel panic. (disregard the wierd problem in post #1, i have progressed to a normal kernel panic - cannot mount / on block (0,0)

this is how I'm trying to make my initrd:
Code:
option 1- don't specify root fs type:
# mkinitrd -c -k 2.6.20.14 -m $(cat /usr/src/linux-2.6.20.14/modules_app-7-2min) -o /boot/initrd.gz

option 2- specify root fs type:
#  mkinitrd -c -k 2.6.20.14 -m $(cat /usr/src/linux-2.6.20.14/modules_app-7-2min) -f reiserfs -r /dev/sda9 -o /boot/initrd.gz-rootspec
and my 'modules_app-7-2min' file:
Code:
zlib_inflate:zlib_deflate:ts_kmp:ts_fsm:ts_bm:vfat:udf:smbfs:reiserfs:msdos:lockd:jbd:fat:ext3:ext2:exportfs:wire:sg:sd_mod:pcmcia:ioatdma:libata:ata_piix:ide-core:ide-disk:ide-generic:piix:cdrom:uhci-hcd:as-iosched:video:thermal:processor:microcode
as above, /proc and /sysfs support are CONFIG_*=y

[ed] forgot my fs types:
Code:
/dev/sda9 on / type reiserfs (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
usbfs on /proc/bus/usb type usbfs (rw,devgid=10,devmode=0666)
/dev/sda10 on /home type ext3 (rw)
/dev/sda3 on /boot type ext2 (rw,nosuid,nodev)
/dev/sda7 on /usr type reiserfs (rw)
/dev/sda8 on /opt type reiserfs (rw)
/dev/sda2 on /mnt/win type ntfs (ro,noexec,nosuid,nodev)
/dev/sda5 on /mnt/vfat type vfat (rw,umask=0000)
//ruach/ph_insert on /mnt/samba/phinsert type smbfs (0)
//ruach/ph1000 on /mnt/samba/ph1000 type smbfs (0)
//ruach/purchasing on /mnt/samba/purchasing type smbfs (0)
and my /boot/grub/menu.lst:
Code:
# cat /boot/grub/menu.lst 
# Change the colors.
#color light-green/brown blink-red/blue
timeout 15
#color black/yellow yellow/black
default 0

# For booting GNU/Linux

title  rootspec-2.6.20.14
kernel (hd0,2)/bzImage-2.6.20.14 root=/dev/sda9 resume=/dev/sda6 vga=normal pci=assign-busses
initrd (hd0,2)/initrd.gz-rootspec

title  norootspec-2.6.20.14
kernel (hd0,2)/bzImage-2.6.20.14 root=/dev/sda9 resume=/dev/sda6 vga=normal pci=assign-busses
initrd (hd0,2)/initrd.gz
also of note, right before the kernel panic there is a console message that the initrd is found.

anything I am missing? please enlighten

Last edited by bioe007; 07-05-2007 at 11:01 AM.
 
  


Reply



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
Install 9.3 -- could not mount /dev/hdaX to /mnt/ ... shock_ez SUSE / openSUSE 2 06-27-2005 02:56 AM
mount -t ext3 /dev/hda3 /mnt/spare Cinematography Linux - General 1 05-12-2005 11:43 AM
could not mount partition /dev/hda2 to mnt/ Doug.Gentry SUSE / openSUSE 5 04-05-2005 10:42 PM
One of my local file systems /dev/sda9 is not mounting Fairlie Linux - Newbie 8 05-10-2004 11:27 PM
How to release /dev/cdorm or mount point (/mnt/cdrom) after doing this : norman68 Linux - General 1 07-02-2003 12:14 PM

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

All times are GMT -5. The time now is 09:55 PM.

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