Mount partitions in root file system in an hdd install

Here you can post about non-standard installation methods
(for example when using grub4dos).
User avatar
justwantin
Black ninja
Black ninja
Posts: 51
Joined: 09 Oct 2011, 19:10
Location: Melbourne, Oz

Mount partitions in root file system in an hdd install

Post#1 by justwantin » 22 Jun 2012, 15:33

Porteus is the only distro that id's everything correctly and runs without problems on my new desktop mobo/cpu setup. I have had problems with both Salix and Slack installs and have spent too much time compilng kernels, bricking my bios and in general trying to figure out exactly what's the problem(s). Since Porteus runs very well as an hdd install on my problem netbook I figured in the interim I'd do a hdd install on my desktop too. The challenge is I want to mount my existing /home, /usr/local, /multimedia and /store partitions in my Porteus root filesystem.

I have used the script below called from /etc/rc.d/rc.local to edit /etc/fstab at boot an remount the partitions. It works fine for /usr/local, /multimedia and /store but I can't seem to get /home to mount as /dev/sda3. I guess there is something else happening at boot or in the background but I'm just out of figuring things out at the moment. Can someone give a heads up on how I can get my /home partition to mount in the root filesystem either with this script or by editing something else.

Code: Select all

#!/bin/bash
# /usr/local/bin/edit-fstab  RM20120622

cat /etc/fstab-good | sed '/sda3/d' | sed '/sda4/d' | sed '/sda7/d' | sed '/sdb1/d' > /etc/fstab

echo "/dev/sda3 /home reiserfs auto,noatime,nodiratime,suid,dev,exec 0 0" >> /etc/fstab
echo "/dev/sda4 /multimedia jfs auto,noatime,nodiratime,suid,dev,exec 0 0" >> /etc/fstab
echo "/dev/sda7 /usr/local reiserfs auto,noatime,nodiratime,suid,dev,exec 0 0" >> /etc/fstab
echo "/dev/sdb1 /store jfs auto,noatime,nodiratime,suid,dev,exec 0 0" >> /etc/fstab
echo -e "\nEnd of /etc/fstab \n" >> /etc/fstab
mount -a
After running the sript the new /etc/fstab looks like this

Code: Select all

# System mounts
aufs / aufs defaults 0 0 # AutoUpdate
proc /proc proc defaults 0 0 # AutoUpdate
sysfs /sys sysfs defaults 0 0 # AutoUpdate

# Device partitions
/dev/sda1 /mnt/sda1 ext4 auto,noatime,nodiratime,suid,dev,exec 0 0 # AutoUpdate
/dev/sda6 /mnt/sda6 reiserfs auto,noatime,nodiratime,suid,dev,exec 0 0 # AutoUpdate
/dev/sda8 /mnt/sda8 reiserfs auto,noatime,nodiratime,suid,dev,exec 0 0 # AutoUpdate
/dev/sdb2 /mnt/sdb2 ext4 auto,noatime,nodiratime,suid,dev,exec 0 0 # AutoUpdate

# Swap partitions
/dev/sda5 none swap auto,sw,pri=1 0 0 # AutoUpdate
/dev/sda3 /home reiserfs auto,noatime,nodiratime,suid,dev,exec 0 0
/dev/sda4 /multimedia jfs auto,noatime,nodiratime,suid,dev,exec 0 0
/dev/sda7 /usr/local reiserfs auto,noatime,nodiratime,suid,dev,exec 0 0
/dev/sdb1 /store jfs auto,noatime,nodiratime,suid,dev,exec 0 0

End of /etc/fstab 
Thanks in advance :*)
Last edited by justwantin on 22 Jun 2012, 22:55, edited 2 times in total.

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5667
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: Mount partitions in root file system in an hdd install

Post#2 by fanthom » 22 Jun 2012, 15:49

hi justwantin,

please show me output of following commands:
a) blkid
b) cat /proc/mounts
c) mount /dev/sda3 /home
d) dmesg | tail
Please add [Solved] to your thread title if the solution was found.

User avatar
justwantin
Black ninja
Black ninja
Posts: 51
Joined: 09 Oct 2011, 19:10
Location: Melbourne, Oz

Re: Mount partitions in root file system in an hdd install

Post#3 by justwantin » 22 Jun 2012, 22:53

g'day fanthom

After running those commands immediately after boot (several times) I 'm thinking that this may be related to my mobo/bios config. Since I set this box up I've been getting random kernel messages like this popping up in my terminal.

Code: Select all

  167.365864] Disabling IRQ #19
The messages interrupt whatever is going on. This IRQ 9 problem is not uncommon and I figured I'd get around to fixing it later in the piece. The last line after the dmesg | tail command is [ 167.365864] Disabling IRQ #19. When /etc/fstab is re-written with my edit-fstab script at boot the new lines for /dev/sda3 and /dev/sdb1 are not being written to /etc/fstab. Proabably because of an IRQ disable message to stdout.

If I remove edit-fstab from /etv/rc.d/rc.local and add a mount /dev/sdXX /path for each partition, the partitions are mounted correctly and all is fine. However, that means there are two mount points in the file system for each partition and if there is a re-mount based on /etc/fstab during a session I will loose the mount points I want.

Here's the output: of your commands (all four}. The disabling message is the last line.

Code: Select all

root@porteus:~# blkid 
/dev/loop0: TYPE="squashfs" 
/dev/loop1: TYPE="squashfs" 
/dev/loop2: TYPE="squashfs" 
/dev/loop3: TYPE="squashfs" 
/dev/loop4: TYPE="squashfs" 
/dev/loop5: TYPE="squashfs" 
/dev/loop6: TYPE="squashfs" 
/dev/loop7: TYPE="squashfs" 
/dev/sda1: UUID="24a75fa7-fa54-4bd0-ba94-dd29092e869e" TYPE="ext4" 
/dev/sda3: UUID="1a551ce1-a757-4836-8805-2d6aff904590" TYPE="reiserfs" 
/dev/sda4: UUID="15acb208-1824-4dbf-b7b0-f93a30185031" TYPE="jfs" 
/dev/sda5: UUID="a3d209bd-9f9c-45c1-b4ea-95532a05b147" TYPE="swap" 
/dev/sda6: UUID="868b28f3-3e83-449a-9309-fe644d8ce9c0" TYPE="reiserfs" 
/dev/sda7: UUID="45e2abfa-5835-49d8-a69a-cdc6539b5dd6" TYPE="reiserfs" 
/dev/sda8: UUID="29776226-0eee-424e-a73a-69d1f6bd0a58" TYPE="reiserfs" 
/dev/sdb1: UUID="b3f5f077-78c1-4ee8-b3ea-3216065aac86" TYPE="jfs" 
/dev/sdb2: UUID="dfaaf864-005a-42eb-a740-7ebb4df04da3" TYPE="ext4" 
/dev/loop8: TYPE="squashfs" 
/dev/loop9: TYPE="squashfs" 
/dev/loop10: TYPE="squashfs" 
/dev/loop11: TYPE="squashfs" 
/dev/loop12: TYPE="squashfs" 
/dev/loop13: TYPE="squashfs" 
/dev/loop14: TYPE="squashfs" 
/dev/loop15: TYPE="squashfs" 
/dev/loop16: TYPE="squashfs" 
/dev/loop17: TYPE="squashfs" 
/dev/loop18: TYPE="squashfs" 
/dev/loop19: TYPE="squashfs" 
/dev/loop20: TYPE="squashfs" 
/dev/loop21: TYPE="squashfs" 
/dev/loop22: TYPE="squashfs" 
/dev/loop23: TYPE="squashfs" 
/dev/loop24: TYPE="squashfs" 
/dev/loop25: TYPE="squashfs" 
/dev/loop26: TYPE="squashfs" 
/dev/loop27: TYPE="squashfs" 
/dev/loop28: TYPE="squashfs" 
/dev/loop29: TYPE="squashfs" 
/dev/loop30: TYPE="squashfs"


root@porteus:~# cat /proc/mounts
rootfs / rootfs rw 0 0
/dev/root /mnt/live ext4 rw,relatime,user_xattr,barrier=1 0 0
proc /mnt/live/proc proc rw,relatime 0 0
none /mnt/live/dev devtmpfs rw,relatime,size=1634220k,nr_inodes=218185,mode=755 0 0
/dev/sda1 /mnt/live/mnt/sda1 ext4 rw,noatime,nodiratime,user_xattr,acl,barrier=1,data=ordered 0 0
/dev/sda1 /mnt/live/memory ext4 rw,noatime,nodiratime,user_xattr,acl,barrier=1,data=ordered 0 0
tmpfs /mnt/live/memory/xino tmpfs rw,relatime 0 0
aufs / aufs rw,relatime,si=695008e8,nowarn_perm 0 0
/dev/loop0 /mnt/live/memory/images/000-kernel.xzm squashfs ro,relatime 0 0
/dev/loop1 /mnt/live/memory/images/001-core.xzm squashfs ro,relatime 0 0
/dev/loop2 /mnt/live/memory/images/002-xorg.xzm squashfs ro,relatime 0 0
/dev/loop3 /mnt/live/memory/images/007-devel.xzm squashfs ro,relatime 0 0
/dev/loop4 /mnt/live/memory/images/008-firefox.xzm squashfs ro,relatime 0 0
/dev/loop5 /mnt/live/memory/images/0090-xfce.xzm squashfs ro,relatime 0 0
/dev/loop6 /mnt/live/memory/images/0091-xfce-apps.xzm squashfs ro,relatime 0 0
/dev/loop7 /mnt/live/memory/images/adobe-reader-9.4.2-i486-2sl.xzm squashfs ro,relatime 0 0
/dev/loop8 /mnt/live/memory/images/audacity-1.3.13-i486-1ab.xzm squashfs ro,relatime 0 0
/dev/loop9 /mnt/live/memory/images/babl-0.1.2-i486-1.xzm squashfs ro,relatime 0 0
/dev/loop10 /mnt/live/memory/images/bluefish-2.0.3-i486-3sl.xzm squashfs ro,relatime 0 0
/dev/loop11 /mnt/live/memory/images/epdfview-0.1.7-i486-5gv.xzm squashfs ro,relatime 0 0
/dev/loop12 /mnt/live/memory/images/fbreader-0.12.10-i486-2_SBo.xzm squashfs ro,relatime 0 0
/dev/loop13 /mnt/live/memory/images/gegl-0.1.2-i486-1.xzm squashfs ro,relatime 0 0
/dev/loop14 /mnt/live/memory/images/gimp-2.6.11-i486-3.xzm squashfs ro,relatime 0 0
/dev/loop15 /mnt/live/memory/images/glib-1.2.10-i486-3.xzm squashfs ro,relatime 0 0
/dev/loop16 /mnt/live/memory/images/gtk+-1.2.10-i486-5.xzm squashfs ro,relatime 0 0
/dev/loop17 /mnt/live/memory/images/gtkglext-1.2.0-i486-3_SBo.xzm squashfs ro,relatime 0 0
/dev/loop18 /mnt/live/memory/images/imagemagick-6.6.6_10-i486-1.xzm squashfs ro,relatime 0 0
/dev/loop19 /mnt/live/memory/images/jdk-6u25-i586-1.xzm squashfs ro,relatime 0 0
/dev/loop20 /mnt/live/memory/images/leafpad-0.8.18.1-i486-1gv.xzm squashfs ro,relatime 0 0
/dev/loop21 /mnt/live/memory/images/liblinebreak-2.0-i486-1dj.xzm squashfs ro,relatime 0 0
/dev/loop22 /mnt/live/memory/images/qt-4.7.0_7abde40-i486-3.xzm squashfs ro,relatime 0 0
/dev/loop23 /mnt/live/memory/images/salix-codecs-installer-0.9.6-noarch-1gv.xzm squashfs ro,relatime 0 0
/dev/loop24 /mnt/live/memory/images/seamonkey-2.5-i486-1_slack13.37.xzm squashfs ro,relatime 0 0
/dev/loop25 /mnt/live/memory/images/seamonkey-solibs-2.5-i486-1_slack13.37.xzm squashfs ro,relatime 0 0
/dev/loop26 /mnt/live/memory/images/wxGTK-2.8.12.1-i486-1ab.xzm squashfs ro,relatime 0 0
/dev/loop27 /mnt/live/memory/images/wxcam-1.0.7-i486-1gv.xzm squashfs ro,relatime 0 0
/dev/loop28 /mnt/live/memory/images/xine-lib-1.1.19-i686-1.xzm squashfs ro,relatime 0 0
/dev/loop29 /mnt/live/memory/images/xine-ui-0.99.5-i686-3.xzm squashfs ro,relatime 0 0
/dev/loop30 /mnt/live/memory/images/xmms-1.2.11-i486-rm1.xzm squashfs ro,relatime 0 0
/dev/sda1 /boot ext4 rw,noatime,nodiratime,user_xattr,acl,barrier=1,data=ordered 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
devtmpfs /dev devtmpfs rw,relatime,size=1634220k,nr_inodes=218185,mode=755 0 0
devpts /dev/pts devpts rw,relatime,gid=5,mode=620,ptmxmode=000 0 0
fusectl /sys/fs/fuse/connections fusectl rw,relatime 0 0
/dev/sda1 /mnt/sda1 ext4 rw,noatime,nodiratime,user_xattr,acl,barrier=1,data=ordered 0 0
/dev/sda3 /mnt/sda3 reiserfs rw,noatime,nodiratime 0 0
/dev/sda4 /mnt/sda4 jfs rw,noatime,nodiratime 0 0
/dev/sda6 /mnt/sda6 reiserfs rw,noatime,nodiratime 0 0
/dev/sda7 /mnt/sda7 reiserfs rw,noatime,nodiratime 0 0
/dev/sda8 /mnt/sda8 reiserfs rw,noatime,nodiratime 0 0
/dev/sdb1 /mnt/sdb1 jfs rw,noatime,nodiratime 0 0
/dev/sdb2 /mnt/sdb2 ext4 rw,noatime,nodiratime,user_xattr,acl,barrier=1,data=ordered 0 0
/dev/sda4 /multimedia jfs rw,noatime,nodiratime 0 0
/dev/sda7 /usr/local reiserfs rw,noatime,nodiratime 0 0
gvfs-fuse-daemon /home/guest/.gvfs fuse.gvfs-fuse-daemon rw,nosuid,nodev,relatime,user_id=1000,group_id=1000 0 0


root@porteus:~# mount /dev/sda3 /home
root@porteus:~# dmesg | tail
[  167.365845]  [<c13793f0>] ? common_interrupt+0x30/0x40
[  167.365847]  [<c102007b>] ? copy_process+0x4c1/0xd4a
[  167.365851]  [<f8b55fe1>] ? acpi_processor_get_throttling_info+0x11fd/0x121e [processor]
[  167.365854]  [<c12d6373>] ? cpuidle_idle_call+0x5c/0x99
[  167.365856]  [<c1001851>] ? cpu_idle+0x96/0xda
[  167.365858]  [<c154a6f3>] ? start_kernel+0x34e/0x354
[  167.365860]  [<c154a153>] ? loglevel+0x2b/0x2b
[  167.365861] handlers:
[  167.365862] [<f88521ee>] 
[  167.365864] Disabling IRQ #19
...and here is an /etc/fstab written by my script at boot. Note it is missing a line for sda3 and sdb1. This does not happen when the script is run in a terminal after boot.

Code: Select all

root@porteus:~# cat /etc/fstab
# System mounts
aufs / aufs defaults 0 0 # AutoUpdate
proc /proc proc defaults 0 0 # AutoUpdate
sysfs /sys sysfs defaults 0 0 # AutoUpdate

# Device partitions
/dev/sda1 /mnt/sda1 ext4 auto,noatime,nodiratime,suid,dev,exec 0 0 # AutoUpdate
/dev/sda3 /mnt/sda3 reiserfs auto,noatime,nodiratime,suid,dev,exec 0 0 # AutoUpdate
/dev/sda6 /mnt/sda6 reiserfs auto,noatime,nodiratime,suid,dev,exec 0 0 # AutoUpdate
/dev/sda8 /mnt/sda8 reiserfs auto,noatime,nodiratime,suid,dev,exec 0 0 # AutoUpdate
/dev/sdb1 /mnt/sdb1 jfs auto,noatime,nodiratime,suid,dev,exec 0 0 # AutoUpdate
/dev/sdb2 /mnt/sdb2 ext4 auto,noatime,nodiratime,suid,dev,exec 0 0 # AutoUpdate

# Swap partitions
/dev/sda5 none swap auto,sw,pri=1 0 0 # AutoUpdate
/dev/sda4 /multimedia jfs auto,noatime,nodiratime,suid,dev,exec 0 0
/dev/sda7 /usr/local reiserfs auto,noatime,nodiratime,suid,dev,exec 0 0

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5667
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: Mount partitions in root file system in an hdd install

Post#4 by fanthom » 23 Jun 2012, 11:45

looks like you have a kernel oops.
please upload whole /var/log/messages to pastebin.com and link here.
Please add [Solved] to your thread title if the solution was found.

User avatar
justwantin
Black ninja
Black ninja
Posts: 51
Joined: 09 Oct 2011, 19:10
Location: Melbourne, Oz

Re: Mount partitions in root file system in an hdd install

Post#5 by justwantin » 23 Jun 2012, 15:21

/var/log/messages is over a meg. I can't put it on pastebin so I've put it here:
http://www.rickmiles.com.au/turtlespond ... u/messages
I've given up on mounting each partition one after the other from rc.loca. They were never all mounted after a boot. I tried to time shift a tv show to /multimedia, it wasn't mounted and I screwed something up so from that point on /multimedia wouldn't mount and I had bad block messages when I tried. Live gparted couldn't do anything with it but I installed salix in sdb2 and could access it, write to it, and when I shut down and booted porteus everything was allright again, go figure. Anyway I appended irqpoll into thelilo boot stanza for porteus and have not had any disabling irq 19 messages pop. I can't say for sure if that did it because I have also removed a pci nick and am using on board nic . I also disabled on board sound and installed a pci audio card. Irq 19 had been assigned to one of the two sound devices. Its now its assigned to one of my dvb-t cards

I now have an /etc/fstab-copy file with sda3, 4, 7 and sdb1 listed that I copy to /etc/fsatb and I remount the file system with mount -a from rc.local. It seems to be working ok for the last three or 4 hours of heavy use testing things building modules etc.

Code: Select all

rm /etc/fstab
cp /etc/fstab-copy /etc/fstab
mount -a
If things are looking ok here you should see the messages from salix........ arrrrrrrrrgh!

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5667
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: Mount partitions in root file system in an hdd install

Post#6 by fanthom » 23 Jun 2012, 16:35

/var/log/messages uploaded by you does not contain any 'Disabling IRQ #19' strings so i'm not able to debug this issue.

anyway - i have other proposition which seems to be more elegant than rc.local hacks:
please use 'magic folders' tool to pair devices in /mnt/sd* with folders in /

will work for sure.
Please add [Solved] to your thread title if the solution was found.

User avatar
justwantin
Black ninja
Black ninja
Posts: 51
Joined: 09 Oct 2011, 19:10
Location: Melbourne, Oz

Re: Mount partitions in root file system in an hdd install

Post#7 by justwantin » 25 Jun 2012, 21:57

Thanks for your help and sorry I haven't returned before today. I've been trying t sort out the hardware issue plus had a write failure that resulted in almost losing all the data on an external drive.

I have installed a new power supply with more amps on the 5 and 12 volt rails. I've found elsewhere that not enough power to go around may cause something to drop out. Perhaps this was the problem here. The graphics card was very hungry. Anyway between a new ps and the bios and pci changes (above) everything seems ok. I've taken irqpoll out of the lilo append line and still there are no "'Disabling IRQ X" messages.
use 'magic folders' tool to pair devices in /mnt/sd* with folders in /
As understand it I can only pair a real file or (I presume) directory to something in the live files system.
magic folders will allow you to save changes that you make to a particular folder in your live file system to a particular folder (or .dat image file) on a hard disk
If that is indeed the case then, for example, if I boot with changes=/porteus and create a user, the user will have /home/username filesystem in /porteus/changes, not in a live /home/username filesystem and the "home" partition on /mnt/sdaX can not be magically paired a to it. I don't believe you guys planned or intended for this kind of usage, you don't recommend running this as an hdd install. My rc.local "hack" is working ok for now and somewhere down the line I'll complile a kernel or figure out somthing that will allow me to run salix or slack on this machine. I'll still keep Porteus as an hdd install on my netbook because my usage on that machine is very simple.

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5667
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: Mount partitions in root file system in an hdd install

Post#8 by fanthom » 26 Jun 2012, 04:49

'magic folders' does nothing more than binding folders together with 'mount -o bind x y' command.
example:
'mount -o bind /mnt/sda4 /usr/share'
i have forgotten to mention that you could also use 'mount -o bind x y' in your rc.local file.

binding takes priority over aufs so if you create a file /usr/share/fanthom then its 'automagically' transported to /mnt/sda4 folder (which is your sda4 partition) and aufs doesn't even know about it's existence thus nothing appears in /mnt/live/memory/changes/usr/share folder.

i see no problems with using 'changes=' cheat together with 'magic folders'. users just need to remember that changes made inside paired folder wont be saved in aufs writable branch.

hope this helps a bit.
Please add [Solved] to your thread title if the solution was found.

User avatar
justwantin
Black ninja
Black ninja
Posts: 51
Joined: 09 Oct 2011, 19:10
Location: Melbourne, Oz

Re: Mount partitions in root file system in an hdd install

Post#9 by justwantin » 26 Jun 2012, 06:52

Yes, thank you

Post Reply