PDA

View Full Version : Automount Partitions On boot not working



wraider1
30-06-2007, 03:04
I just upgraded to the g release and cannot get the harddrive to automount, it boots up with /tmp/harddisk everytime. I have followed sprayfly directions and everything seems to work fine until I reboot, always goes back to /tmp/harddisk. ug:mad: :eek: :confused:

post-boot is in the correct dir but it seems that it is not being read HELP!!!

Command (m for help): p

Disk /dev/discs/disc0/disc: 100.0 GB, 100030242816 bytes
16 heads, 63 sectors/track, 193821 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

Device Boot Start End Blocks Id System
/dev/discs/disc0/part1 1 184075 92773768+ 83 Linux
/dev/discs/disc0/part2 184076 193821 4911984 82 Linux swap

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

[root@~1~ root]$ mount /dev/discs/disc0/part1 /opt
[root@~1~ root]$ swapon /dev/discs/disc0/part2
[root@~1~ root]$ df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/root 2880 2880 0 100% /
/dev/discs/disc0/part1 91317728 139628 86539412 0% /opt

[root@~1~ root]$ nano /usr/local/sbin/post-boot
GNU nano 2.0.6 File: /usr/local/sbin/post-boot

#!/bin/sh
mount /dev/discs/disc0/part1 /opt
i=0
while [ -le 30 ]
do
if [ -d /opt/etc ]
then
break
fi
sleep 1
i='expr + 1'
done
swapon /dev/discs/disc0/part2
/opt/etc/init.d/rc.unslung

log info:
Dec 31 19:00:02 syslogd started: BusyBox v1.1.3
Dec 31 19:00:02 kernel: klogd started: BusyBox v1.1.3 (2007.01.01-14:37+0000)
Dec 31 19:00:02 kernel: cpu probe
Dec 31 19:00:02 kernel: prom init
Dec 31 19:00:02 kernel: cpu report
Dec 31 19:00:02 kernel: CPU revision is: 00024000
Dec 31 19:00:02 kernel: Loading BCM4710 MMU routines.
Dec 31 19:00:02 kernel: Primary instruction cache 8kb, linesize 16 bytes (2 ways)
Dec 31 19:00:02 kernel: Primary data cache 4kb, linesize 16 bytes (2 ways)
Dec 31 19:00:02 kernel: Linux version 2.4.20 (root@omnibook) (gcc version 3.2.3 with Broadcom modifications) #75 Fri Apr 6 00:12:23 MSD 2007
Dec 31 19:00:02 kernel: Setting the PFC value as 0x15
Dec 31 19:00:02 kernel: Determined physical RAM map:
Dec 31 19:00:02 kernel: memory: 01000000 @ 00000000 (usable)
Dec 31 19:00:02 kernel: On node 0 totalpages: 4096
Dec 31 19:00:02 kernel: zone(0): 4096 pages.
Dec 31 19:00:02 kernel: zone(1): 0 pages.
Dec 31 19:00:02 kernel: zone(2): 0 pages.
Dec 31 19:00:02 kernel: Kernel command line: root=/dev/mtdblock2 noinitrd init=/linuxrc console=ttyS0,115200
Dec 31 19:00:02 kernel: CPU: BCM4710 rev 0 at 125 MHz
Dec 31 19:00:02 kernel: !unable to setup serial console!
Dec 31 19:00:02 kernel: Calibrating delay loop... 82.94 BogoMIPS
Dec 31 19:00:02 kernel: Memory: 13840k/16384k available (1799k kernel code, 2544k reserved, 248k data, 68k init, 0k highmem)
Dec 31 19:00:02 kernel: Dentry cache hash table entries: 2048 (order: 2, 16384 bytes)
Dec 31 19:00:02 kernel: Inode cache hash table entries: 1024 (order: 1, 8192 bytes)
Dec 31 19:00:02 kernel: Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
Dec 31 19:00:02 kernel: Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes)
Dec 31 19:00:02 kernel: Page-cache hash table entries: 4096 (order: 2, 16384 bytes)
Dec 31 19:00:02 kernel: Checking for 'wait' instruction... unavailable.
Dec 31 19:00:02 kernel: POSIX conformance testing by UNIFIX
Dec 31 19:00:02 kernel: PCI: Fixing up bus 0
Dec 31 19:00:02 kernel: PCI: Fixing up bridge
Dec 31 19:00:02 kernel: PCI: Fixing up bus 1
Dec 31 19:00:02 kernel: Linux NET4.0 for Linux 2.4
Dec 31 19:00:02 kernel: Based upon Swansea University Computer Society NET3.039
Dec 31 19:00:02 kernel: Initializing RT netlink socket
Dec 31 19:00:02 kernel: Starting kswapd
Dec 31 19:00:02 kernel: Journalled Block Device driver loaded
Dec 31 19:00:02 kernel: devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au)
Dec 31 19:00:02 kernel: devfs: boot_options: 0x1
Dec 31 19:00:02 kernel: NTFS driver v1.1.22 [Flags: R/O]
Dec 31 19:00:02 kernel: pty: 256 Unix98 ptys configured
Dec 31 19:00:02 kernel: Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled
Dec 31 19:00:02 kernel: HDLC line discipline: version $Revision$, maxframe=4096
Dec 31 19:00:02 kernel: N_HDLC line discipline registered.
Dec 31 19:00:02 kernel: loop: loaded (max 8 devices)
Dec 31 19:00:02 kernel: PPP generic driver version 2.4.2
Dec 31 19:00:02 kernel: PPP Deflate Compression module registered
Dec 31 19:00:02 kernel: PPP BSD Compression module registered
Dec 31 19:00:02 kernel: MPPE/MPPC encryption/compression module registered
Dec 31 19:00:02 kernel: Amd/Fujitsu Extended Query Table v1.1 at 0x0040
Dec 31 19:00:02 kernel: Flash Id: Vendor: 0x00c2 Device: 0x00a7
Dec 31 19:00:02 kernel: Physically mapped flash: Swapping erase regions for broken CFI table.
Dec 31 19:00:02 kernel: number of CFI chips: 1
Dec 31 19:00:02 kernel: Flash device: 0x400000 at 0x1fc00000
Dec 31 19:00:02 kernel: Physically mapped flash: squashfs filesystem found at block 941
Dec 31 19:00:02 kernel: Creating 5 MTD partitions on "Physically mapped flash":
Dec 31 19:00:02 kernel: 0x00000000-0x00040000 : "pmon"
Dec 31 19:00:02 kernel: 0x00040000-0x003f0000 : "linux"
Dec 31 19:00:02 kernel: 0x000eb714-0x003f0000 : "rootfs"
Dec 31 19:00:02 kernel: 0x003f0000-0x00400000 : "nvram"
Dec 31 19:00:02 kernel: 0x003e0000-0x003f0000 : "flashfs"
Dec 31 19:00:02 kernel: sflash: chipcommon not found
Dec 31 19:00:02 kernel: NET4: Linux TCP/IP 1.0 for NET4.0
Dec 31 19:00:02 kernel: IP Protocols: ICMP, UDP, TCP, IGMP
Dec 31 19:00:02 kernel: IP: routing cache hash table of 512 buckets, 4Kbytes
Dec 31 19:00:02 kernel: TCP: Hash tables configured (established 1024 bind 2048)
Dec 31 19:00:02 kernel: Linux IP multicast router 0.06 plus PIM-SM
Dec 31 19:00:02 kernel: ip_conntrack version 2.1 (128 buckets, 1024 max) - 352 bytes per conntrack
Dec 31 19:00:02 kernel: ip_conntrack_pptp version 1.9 loaded
Dec 31 19:00:02 kernel: ip_nat_pptp version 1.5 loaded
Dec 31 19:00:02 kernel: ip_tables: (C) 2000-2002 Netfilter core team
Dec 31 19:00:02 kernel: ipt_time loading
Dec 31 19:00:02 kernel: NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
Dec 31 19:00:02 kernel: IPv6 v0.8 for NET4.0
Dec 31 19:00:02 kernel: IPv6 over IPv4 tunneling driver
Dec 31 19:00:02 kernel: NET4: Ethernet Bridge 008 for NET4.0
Dec 31 19:00:02 kernel: 802.1Q VLAN Support v1.7 Ben Greear <greearb@candelatech.com>
Dec 31 19:00:02 kernel: All bugs added by David S. Miller <davem@redhat.com>
Dec 31 19:00:02 kernel: FAT: bogus logical sector size 54016
Dec 31 19:00:02 kernel: FAT: bogus logical sector size 54016
Dec 31 19:00:02 kernel: NTFS: Unable to set blocksize 512.
Dec 31 19:00:02 kernel: VFS: Mounted root (squashfs filesystem) readonly.
Dec 31 19:00:02 kernel: Mounted devfs on /dev
Dec 31 19:00:02 kernel: Freeing unused kernel memory: 68k freed
Dec 31 19:00:02 kernel: Warning: unable to open an initial console.
Dec 31 19:00:02 kernel: Algorithmics/MIPS FPU Emulator v1.5
Dec 31 19:00:02 kernel: Uniform Multi-Platform E-IDE driver Revision: 6.31
Dec 31 19:00:02 kernel: ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
Dec 31 19:00:02 kernel: PDC20265: IDE controller on PCI bus 01 dev 08
Dec 31 19:00:02 kernel: PCI: Enabling device 01:01.0 (0004 -> 0007)
Dec 31 19:00:02 kernel: PDC20265: chipset revision 2
Dec 31 19:00:02 kernel: PDC20265: not 100% native mode: will probe irqs later
Dec 31 19:00:02 kernel: PDC20265: ROM enabled at 0x000d0000
Dec 31 19:00:02 kernel: PCI Mode Secondary PCI Mode.
Dec 31 19:00:02 kernel: PDC20265: FORCING BURST BIT 0x00 -> 0x01 ACTIVE
Dec 31 19:00:02 kernel: ide0: BM-DMA at 0x0140-0x0147, BIOS settings: hda:pio, hdb:pio
Dec 31 19:00:02 kernel: ide1: BM-DMA at 0x0148-0x014f, BIOS settings: hdc:pio, hdd:pio
Dec 31 19:00:03 kernel: hda: ST9100822A, ATA DISK drive
Dec 31 19:00:03 kernel: ide2: ports already in use, skipping probe
Dec 31 19:00:03 kernel: ide3: ports already in use, skipping probe
Dec 31 19:00:03 kernel: ide4: ports already in use, skipping probe
Dec 31 19:00:03 kernel: ide5: ports already in use, skipping probe

wraider1
30-06-2007, 03:14
Dec 31 19:00:03 kernel: ide0 at 0x100-0x107,0x10a on irq 6
Dec 31 19:00:03 kernel: blk: queue c00222e8, I/O limit 4095Mb (mask 0xffffffff)
Dec 31 19:00:03 kernel: hda: 195371568 sectors (100030 MB) w/8192KiB Cache, CHS=193821/16/63, UDMA(33)
Dec 31 19:00:03 kernel: Partition check:
Dec 31 19:00:03 kernel: /dev/ide/host0/bus0/target0/lun0: p1 p2
Dec 31 19:00:03 kernel: eth0: Broadcom BCM47xx 10/100 Mbps Ethernet Controller 3.90.37.0
Dec 31 19:00:03 kernel: eth1: Broadcom BCM47xx 10/100 Mbps Ethernet Controller 3.90.37.0
Dec 31 19:00:03 kernel: PCI: Enabling device 01:02.0 (0004 -> 0006)
Dec 31 19:00:03 kernel: eth2: Broadcom BCM4320 802.11 Wireless Controller 3.90.38.0
Dec 31 19:00:03 kernel: device eth2 entered promiscuous mode
Dec 31 19:00:03 kernel: device eth1 entered promiscuous mode
Dec 31 19:00:03 kernel: br0: port 2(eth1) entering learning state
Dec 31 19:00:03 kernel: br0: port 1(eth2) entering learning state
Dec 31 19:00:03 kernel: br0: port 2(eth1) entering forwarding state
Dec 31 19:00:03 kernel: br0: topology change detected, propagating
Dec 31 19:00:03 kernel: br0: port 1(eth2) entering forwarding state
Dec 31 19:00:03 kernel: br0: topology change detected, propagating
Dec 31 19:00:03 kernel: usb.c: registered new driver usbdevfs
Dec 31 19:00:03 kernel: usb.c: registered new driver hub
Dec 31 19:00:03 kernel: usb-ohci.c: USB OHCI at membase 0xb8004000, IRQ 2
Dec 31 19:00:03 kernel: usb-ohci.c: usb-00:04.0, PCI device 14e4:4715
Dec 31 19:00:03 kernel: usb.c: new USB bus registered, assigned bus number 1
Dec 31 19:00:03 kernel: hub.c: USB hub found
Dec 31 19:00:03 kernel: hub.c: 2 ports detected
Dec 31 19:00:04 kernel: usb.c: registered new driver usblp
Dec 31 19:00:04 kernel: printer.c: v0.13: USB Printer Device Class driver
Dec 31 19:00:04 kernel: hub.c: new USB device 00:04.0-1, assigned address 2
Dec 31 19:00:04 kernel: usb.c: USB device 2 (vend/prod 0x41e/0x4055) is not claimed by any active driver.
Dec 31 19:00:04 USB webcam: attached
Dec 31 19:00:06 kernel: usb.c: registered new driver audio
Dec 31 19:00:06 kernel: audio.c: v1.0.0:USB Audio Class driver
Dec 31 19:00:06 kernel: Linux video capture interface: v1.00
Dec 31 19:00:07 kernel: pwc Philips webcam module version 9.0.2 loaded.
Dec 31 19:00:07 kernel: pwc Supports Philips PCA645/646, PCVC675/680/690, PCVC720[40]/730/740/750 & PCVC830/840.
Dec 31 19:00:07 kernel: pwc Also supports the Askey VC010, various Logitech Quickcams, Samsung MPC-C10 and MPC-C30,
Dec 31 19:00:07 kernel: pwc the Creative WebCam 5 & Pro Ex, SOTEC Afina Eye and Visionite VCS-UC300 and VCS-UM100.
Dec 31 19:00:07 kernel: pwc Default image size set to vga [640x480].
Dec 31 19:00:07 kernel: usb.c: registered new driver Philips webcam
Dec 31 19:00:07 kernel: SCSI subsystem driver Revision: 1.00
Dec 31 19:00:07 kernel: pwc Philips webcam decompressor routines version 9.0-BETA-2
Dec 31 19:00:07 kernel: pwc Supports all cameras supported by the main module (pwc).
Dec 31 19:00:08 kernel: Initializing USB Mass Storage driver...
Dec 31 19:00:08 kernel: usb.c: registered new driver usb-storage
Dec 31 19:00:08 kernel: USB Mass Storage support registered.
Dec 31 19:00:09 kernel: Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
Dec 31 19:00:10 portmap[91]: user rpc not found, reverting to user bin
Jun 29 21:19:06 ntp client: Synchronizing time with time.nist.gov ...
Jun 29 21:19:06 kernel: VFS: Can't find ext3 filesystem on dev ide0(3,0).
Jun 29 21:19:06 kernel: MSDOS FS: Using codepage 950
Jun 29 21:19:06 kernel: MSDOS FS: IO charset cp950
Jun 29 21:19:06 kernel: FAT: bogus logical sector size 0
Jun 29 21:19:06 kernel: VFS: Can't find a valid FAT filesystem on dev 03:00.
Jun 29 21:19:06 kernel: FAT: freeing iocharset=cp950
Jun 29 21:19:06 kernel: FAT: bogus logical sector size 0
Jun 29 21:19:06 kernel: VFS: Can't find a valid FAT filesystem on dev 03:00.
Jun 29 21:19:06 kernel: kjournald starting. Commit interval 5 seconds
Jun 29 21:19:06 kernel: EXT3 FS 2.4-0.9.19, 19 August 2002 on ide0(3,1), internal journal
Jun 29 21:19:06 kernel: EXT3-fs: recovery complete.
Jun 29 21:19:06 kernel: EXT3-fs: mounted filesystem with ordered data mode.
Jun 29 21:19:06 USB storage: ext3 fs mounted to /tmp/harddisk
Jun 29 21:19:06 kernel: VFS: Can't find ext3 filesystem on dev ide0(3,2).
Jun 29 21:19:06 kernel: MSDOS FS: Using codepage 950
Jun 29 21:19:06 kernel: MSDOS FS: IO charset cp950
Jun 29 21:19:06 kernel: FAT: bogus logical sector size 0
Jun 29 21:19:06 kernel: VFS: Can't find a valid FAT filesystem on dev 03:02.
Jun 29 21:19:06 kernel: FAT: freeing iocharset=cp950
Jun 29 21:19:06 kernel: FAT: bogus logical sector size 0
Jun 29 21:19:06 kernel: VFS: Can't find a valid FAT filesystem on dev 03:02.
Jun 29 21:20:03 login[133]: root login on `pts/0'
Jun 29 21:21:42 kernel: kjournald starting. Commit interval 5 seconds
Jun 29 21:21:42 kernel: EXT3 FS 2.4-0.9.19, 19 August 2002 on ide0(3,1), internal journal
Jun 29 21:21:42 kernel: EXT3-fs: mounted filesystem with ordered data mode.
Jun 29 21:23:20 kernel: Adding Swap: 524276k swap-space (priority -1)
Jun 29 21:26:58 smbd[327]: [2007/06/29 21:26:58, 0] smbd/service.c:make_connection(502)
Jun 29 21:26:58 smbd[327]: Can't change directory to /tmp/harddisk (Permission denied)
Jun 29 21:26:58 smbd[327]: [2007/06/29 21:26:58, 0] smbd/service.c:make_connection(502)
Jun 29 21:26:58 smbd[327]: Can't change directory to /tmp/harddisk (Permission denied)
Jun 29 21:26:59 smbd[327]: [2007/06/29 21:26:59, 0] smbd/service.c:make_connection(502)
Jun 29 21:26:59 smbd[327]: Can't change directory to /tmp/harddisk (Permission denied)
Jun 29 21:26:59 smbd[327]: [2007/06/29 21:26:59, 0] smbd/service.c:make_connection(502)
Jun 29 21:26:59 smbd[327]: Can't change directory to /tmp/harddisk (Permission denied)
Jun 29 21:26:59 smbd[327]: [2007/06/29 21:26:59, 0] smbd/service.c:make_connection(502)
Jun 29 21:26:59 smbd[327]: Can't change directory to /tmp/harddisk (Permission denied)
Jun 29 21:26:59 smbd[327]: [2007/06/29 21:26:59, 0] smbd/service.c:make_connection(502)
Jun 29 21:26:59 smbd[327]: Can't change directory to /tmp/harddisk (Permission denied)
Jun 29 21:26:59 smbd[327]: [2007/06/29 21:26:59, 0] smbd/service.c:make_connection(502)
Jun 29 21:26:59 smbd[327]: Can't change directory to /tmp/harddisk (Permission denied)
Jun 29 21:40:43 smbd[663]: [2007/06/29 21:40:43, 0] smbd/service.c:make_connection(502)
Jun 29 21:40:43 smbd[663]: Can't change directory to /tmp/harddisk (Permission denied)
Jun 29 21:40:43 smbd[663]: [2007/06/29 21:40:43, 0] smbd/service.c:make_connection(502)
Jun 29 21:40:43 smbd[663]: Can't change directory to /tmp/harddisk (Permission denied)
Jun 29 21:43:04 smbd[716]: [2007/06/29 21:43:04, 0] smbd/service.c:make_connection(502)
Jun 29 21:43:04 smbd[716]: Can't change directory to /tmp/harddisk (Permission denied)
Jun 29 21:43:04 smbd[716]: [2007/06/29 21:43:04, 0] smbd/service.c:make_connection(502)
Jun 29 21:43:04 smbd[716]: Can't change directory to /tmp/harddisk (Permission denied)
Jun 29 21:43:04 smbd[716]: [2007/06/29 21:43:04, 0] smbd/service.c:make_connection(502)
Jun 29 21:43:04 smbd[716]: Can't change directory to /tmp/harddisk (Permission denied)
Jun 29 21:43:04 smbd[716]: [2007/06/29 21:43:04, 0] smbd/service.c:make_connection(502)
Jun 29 21:43:04 smbd[716]: Can't change directory to /tmp/harddisk (Permission denied)
Jun 29 21:43:04 smbd[716]: [2007/06/29 21:43:04, 0] smbd/service.c:make_connection(502)
Jun 29 21:43:04 smbd[716]: Can't change directory to /tmp/harddisk (Permission denied)
Jun 29 21:43:04 smbd[716]: [2007/06/29 21:43:04, 0] smbd/service.c:make_connection(502)
Jun 29 21:43:04 smbd[716]: Can't change directory to /tmp/harddisk (Permission denied)
Jun 29 21:43:04 smbd[716]: [2007/06/29 21:43:04, 0] smbd/service.c:make_connection(502)
Jun 29 21:43:04 smbd[716]: Can't change directory to /tmp/harddisk (Permission denied)
Jun 29 22:02:36 login[1185]: root login on `pts/0'

KGy
30-06-2007, 05:30
Hi, sorry my english.

I think, your hdd mount to /opt and your samba configure to /tmp/harddisk.
Change path your smb.conf to /opt/...and working your samba...

George

wraider1
30-06-2007, 20:40
Thank you, I checked and samba not the problem. It seems that post-boot is not running.
Do you know what the default file is that mounts /tmp/harddisk?

Thankyou for your time:)

KGy
01-07-2007, 05:04
Hi, sorry my english.



It seems that post-boot is not running.

I think you forget add x attribute to your post-boot script or not save to flash.
Check this:


[admin@MYROUTER cgi-bin]$ ls -l /usr/local/sbin/post-boot
-rwxr-xr-x 1 admin root 1503 Jun 29 07:34 /usr/local/sbin/post-boot


if not look x attribute, run this:


chmod +x /usr/local/sbin/post-boot

flashfs save
flashfs commit
flashfs enable


if you look:
ls: /usr/local/sbin/post-boot: No such file or directory

recreate this file, change attibute and save to flash

George

wraider1
01-07-2007, 05:33
Yes, I actually copy and paste from http://www.sprayfly.com/wiki/Automount

here is everything I did:

mkdir /usr/local/sbin
touch /usr/local/sbin/post-boot
touch /usr/local/sbin/post-firewall
chmod +x /usr/local/sbin/*

then:

nano /usr/local/sbin/post-boot

added:

cat << eof > /usr/local/sbin/post-boot
#!/bin/sh
mount /dev/discs/disc0/part1 /opt
i=0
while [ $i -le 30 ]
do
if [ -d /opt/etc ]
then
break
fi
sleep 1
i='expr $i + 1'
done
swapon /dev/discs/disc0/part2
/opt/etc/init.d/rc.unslung
eof

saved and exit nano

then run:

flashfs save
flashfs commit
flashfs enable
reboot

The partition is not mounted, reverts back to /tmp/harddisk or post-boot is never read. I started over, reformatted HD setup everything and did it all over again and it does the same thing.....:mad:

It seems to me that flashfs is not really flashing or it is losing info on reboot reverting back to default.

Thanks for the help anyway....

wraider1
01-07-2007, 05:47
Will this work? Download source, find where /tmp/harddrive is and change it to mount /dev/discs/disc0/part1 /opt and swapon /dev/discs/disc0/part2. I do not know what to use to compile, I have suse linux on one computer and xp on another, have never complied before....ug, very frustrating, but I have learned alot.

Thanks

al37919
03-07-2007, 13:22
Remove first:
cat << eof > /usr/local/sbin/post-boot
and last:
eof
lines in your post-boot file. They are not intended to be in the file, but it's just a way to create a file from console, without usage of editor.

Once again it is important that the line:
#!/bin/sh
is the first line in the executable file

wraider1
04-07-2007, 19:38
al37919,

Thank you!! that was the problem. Partition1 now mounted to /opt after reboot, I also added HDD standby and it is working great.

Thanks again,
wraider1