LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 07-31-2016, 04:46 PM   #1
atelszewski
Member
 
Registered: Aug 2007
Distribution: Slackware
Posts: 948

Rep: Reputation: Disabled
14.2, setup, why can't I see /mnt in /proc/mounts


Hi,

Once the setup program finishes and I'm dropped back into the terminal, I should see my hard drive root partition mounted on /mnt.

But it is not so:
Code:
$ cat /proc/mounts
rootfs / rootfs rw,size=2000744k,nr_inodes=500186 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
devtmpfs /dev devtmpfs rw,relatime,size=2000756k,nr_inodes=500189,mode=755 0 0
devpts /dev/pts devpts rw,relatime,gid=5,mode=620,ptmxmode=000 0 0
tmpfs /dev/shm tmpfs rw,relatime 0 0
proc /mnt/proc proc rw,relatime 0 0
sysfs /mnt/sys sysfs rw,relatime 0 0
devtmpfs /mnt/dev devtmpfs rw,relatime,size=2000756k,nr_inodes=500189,mode=755 0 0
In addition, I have separate partition for /boot, which also should be listed as mounted, but it clearly isn't.

On the other hand, it looks like /mnt and /mnt/boot contain the correctly installed files.

On yet another hand, if I try to mount my /boot partition, I get the following:
Code:
$ mount /dev/vda1 /test
mount: unknown filesystem type 'ext2'
What kind of magic is this?

--
Best regards,
Andrzej Telszewski
 
Old 07-31-2016, 05:22 PM   #2
STDOUBT
Member
 
Registered: May 2010
Location: Stumptown
Distribution: Slackware64
Posts: 583

Rep: Reputation: 242Reputation: 242Reputation: 242
I think during install, and just after setup, the installed system is under /mnt/ like you say.
But, you need to chroot to /mnt in order to see what is there from that system's perspective...
HTH!
 
Old 07-31-2016, 05:23 PM   #3
urbanwks
Member
 
Registered: Sep 2003
Distribution: Slackware64-Current, FreeBSD 12.1, Alpine 5.4, Manjaro 19, Alpine on WSL [Win10]
Posts: 194

Rep: Reputation: 213Reputation: 213Reputation: 213
This might be a stupid question, but did you reboot after Setup dropped you back into a terminal, and load the installation you just performed? That should allow entries in fstab that you configured in Setup to mount properly.
 
Old 07-31-2016, 05:32 PM   #4
atelszewski
Member
 
Registered: Aug 2007
Distribution: Slackware
Posts: 948

Original Poster
Rep: Reputation: Disabled
Hi,

False alarm.

I'm experimenting with booting the installer in different ways within QEMU.
Most probably, the setup program silently ignored the impossibility of mounting the root and boot partitions and installed everything under /mnt, which in the end landed in ramfs. Upon inspection, the partitions were blank. In addition, just after I exited setup, I noticed the README file under /mnt, which leads me to thinking that the partitions were not mounted by setup. That also explains the failure of trying to manually mount /dev/vda1 - simply, the ext* file system modules were not available.

On a side note, what is the proper way of adding modules to the initrd.img as found on the DVD?
I need only to know, where are the correct modules and how can I make them visible.

I tried adding them from /lib/modules on my machine and then running depmod -b on the initrd tree, but when I tried to insert the modules, I got exec format error or something like that. The modules of interest are listed here.

I know how to unpack, modify and pack again the initrd.img and later on how to create the new DVD.
I only need to know how to correctly add the modules.

Thanks!

--
Best regards,
Andrzej Telszewski
 
Old 07-31-2016, 05:36 PM   #5
STDOUBT
Member
 
Registered: May 2010
Location: Stumptown
Distribution: Slackware64
Posts: 583

Rep: Reputation: 242Reputation: 242Reputation: 242
Quote:
On a side note, what is the proper way of adding modules to the initrd.img as found on the DVD?
It is recommended to use /usr/share/mkinitrd/mkinitrd_command_generator.sh
Rather than "add" modules to the initrd.gz, you should simply roll a new one with the modules you need.
 
Old 07-31-2016, 05:38 PM   #6
atelszewski
Member
 
Registered: Aug 2007
Distribution: Slackware
Posts: 948

Original Poster
Rep: Reputation: Disabled
Hi,

I am not talking about initrd.gz for booting the system.
I am talking about initrd.img from DVD, used for system installation.

--
Best regards,
Andrzej Telszewski
 
Old 08-04-2016, 05:38 PM   #7
atelszewski
Member
 
Registered: Aug 2007
Distribution: Slackware
Posts: 948

Original Poster
Rep: Reputation: Disabled
Hi,

Quote:
Originally Posted by atelszewski View Post
On a side note, what is the proper way of adding modules to the initrd.img as found on the DVD?
I need only to know, where are the correct modules and how can I make them visible.

I tried adding them from /lib/modules on my machine and then running depmod -b on the initrd tree, but when I tried to insert the modules, I got exec format error or something like that.
It turned out I did it correctly and the problem was somewhere else. I described it here.


For the record, this is the procedure I used to add modules to the installer initrd.img:
Code:
$ mkdir /tmp/initrd.img
$ cd /tmp/initrd.img
$ gunzip -cd /home/software/slackware/mirror/slackware64-14.2/isolinux/initrd.img | cpio -dvim

$ cp --archive --parents /lib/modules/4.4.14/kernel/fs/9p/9p.ko /tmp/initrd.img
$ gzip -9 /tmp/initrd.img/lib/modules/4.4.14/kernel/fs/9p/*.ko
$ depmod -b /tmp/initrd.img

$ find . | cpio -o -H newc | gzip -9c > /home/software/slackware/mirror/slackware64-14.2/isolinux/initrd9p.img
Then you have to recreate the DVD image, for example with something like that:
Code:
$ cat slackware-dvd.sh
#!/bin/bash

set -e

if ! [[ -d slackware || -d slackware64 ]] || [[ ! -d isolinux ]]; then
  echo "error: please run this script from within Slackware tree"
  exit 1
fi

ISONAME=$(basename -- $(pwd))-install-dvd.iso
OUTPUT=$(pwd)

GETOPTTMP=$(getopt -o "+o:" -n "$0" -- "$@") || exit 1
eval set -- "$GETOPTTMP" || exit 1
unset GETOPTTMP

while true; do
  if   [ $1 = -o ]; then
    OUTPUT=$2
    shift 2
  elif [ $1 = -- ]; then
    shift
    break
  else
    echo "$0: getopt: internal error"
    exit 1
  fi
done

if [ $# -ne 0 ]; then
  echo "$0: excessive arguments given"
  exit 1
fi

mkisofs                                                    \
  -R -J -A "Slackware Install"                             \
  -hide-rr-moved                                           \
  -v -d -N                                                 \
  -no-emul-boot -boot-load-size 4 -boot-info-table         \
  -sort isolinux/iso.sort                                  \
  -b isolinux/isolinux.bin                                 \
  -c isolinux/isolinux.boot                                \
  -eltorito-alt-boot -no-emul-boot -eltorito-platform 0xEF \
  -eltorito-boot isolinux/efiboot.img                      \
  -o "$OUTPUT/$ISONAME"                                    \
  -m "source"                                              \
  -V "slackware-dvd" .
and then boot the recreated DVD image like that:
Code:
boot: huge.s initrd=initrd9p.img
--
Best regards,
Andrzej Telszewski
 
1 members found this post helpful.
Old 08-04-2016, 06:13 PM   #8
Gerard Lally
Senior Member
 
Registered: Sep 2009
Location: Leinster, IE
Distribution: Slackware, NetBSD
Posts: 2,181

Rep: Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763
Quote:
Originally Posted by atelszewski View Post
Hi,


It turned out I did it correctly and the problem was somewhere else. I described it here.


For the record, this is the procedure I used to add modules to the installer initrd.img:

<snip>
Very useful. Cheers.
 
  


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
/etc/mtab vs /proc/mounts Newbie2Fedora Linux - Newbie 2 08-25-2012 12:47 PM
Bad entries in /proc/mounts GDarkBladE Linux - General 7 08-04-2009 09:09 AM
filesystems in /proc/mounts are ro dindome Linux - Hardware 1 06-24-2008 04:51 AM
/etc/mtab vs. /proc/self/mounts ciotog Slackware 1 10-10-2005 04:31 AM
About /proc/mounts A-Liang Programming 3 11-27-2004 09:52 PM

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

All times are GMT -5. The time now is 10:12 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