Page 2 of 2 FirstFirst 12
Results 16 to 28 of 28

Thread: disable auto-mounting on boot time

  1. #16
    Join Date
    Jul 2007
    Location
    Austria
    Posts
    1,336
    @al37919

    Man - many thks, it's exactly what I need!
    Now, the pre-shutdown make sense - and the best is, that everything what I want to achieve is running well and stable on my 2 asus routers.
    Ok, I've bricked one with (guessing) samba under heavy load, even the serial console was not working any more - but this was solved with nice -n-17.
    And now the unclear umount is solved!

    Thanks again, maybe I start now my planned project, mc on asus-rs232

  2. #17
    Yeah, it now works without swapon -a and mount -a, my fstab is:

    PHP Code:
    /dev/discs/disc0/part1  none       swap    sw                      0 0
    /dev/discs/disc0/part2  /opt       ext3    noatime,nodiratime      1 1 
    and my post-boot is:

    PHP Code:
    #!/bin/sh

    if [ ! -/dev/discs ] ; then
       insmod scsi_mod 
    && insmod sd_mod && insmod usb-storage
    fi

    i
    =0
    while [ $i -le 30 ] ; do
       if [ -
    /opt/etc ] ; then
          
    break
       
    fi

       sleep 1
       i
    ='expr $i + 1'
    done

    sleep 10

    /opt/etc/init.d/rc.unslung 
    I had to add sleep 10 before calling rc.unslung, otherwise it would not start samba and xinetd

  3. #18
    Join Date
    Feb 2007
    Location
    Moscow, Russia
    Posts
    3,805
    you can simplify it even further:
    PHP Code:
    #!/bin/sh 
     
    if [ ! -/dev/discs ] ; then 
       insmod scsi_mod 
    && insmod sd_mod && insmod usb-storage 
    fi 
     
    sleep 15s
     
    /opt/etc/init.d/rc.unslung 

  4. #19
    thx @al37919 and thx @newbiefan

    your hints were perfect. with fstab my mount problem is solved.

    especially thx for the pre-shutdown hint, what solved following problem:

    i formated my hdd with fdisk and edited the fstab file as described and afterwards i made the common "flashfs save && flashfs commit && flashfs enable && reboot"

    after booting process was finished i wondered why my just created partition was not able to be mounted, and even the partition seamed not to be formated. and now i am sure it was just the reboot command. some data wasnt written to hdd just in cache i think.


    how do you remove usb devices safely btw?

  5. #20
    Join Date
    Jul 2007
    Location
    Austria
    Posts
    1,336

    remove usb device

    That was exactly my problem, I had to mount a bunch of usb sticks and have not been able to unmount them in a correct way. Several sticks had problems with that (after a while).

    When you need to unmount (which means to remove=linux) a usb storage device, you have to remount this device in read only mode as al37919 stated.
    http://wl500g.info/showpost.php?p=76188&postcount=15
    A regular umount doesn't work proper, maybe fstab handling (process) is one of the reasons.

  6. #21
    I have sort of a related problem. During the startup sometimes I can see this mount is shown on my system

    /dev/discs/disc0/part1 151705660 20985876 123013576 15% /tmp/mnt/disc0_1

    I did not specify this mount and I do not use fstab, this file does not exist on my system.

    I would like to know where it comes from and how to get rid of it?

    this is what I mount in the post-boot:
    mount /dev/scsi/host0/bus0/target0/lun0/part1 /opt

    I have this line in my post-mount:

    /bin/mount -o bind,sync,noatime,rw /tmp/harddisk/opt /opt

    may it be related?

    Thanks.

  7. #22
    Join Date
    Feb 2007
    Location
    Moscow, Russia
    Posts
    3,805
    if you look carefully, you'll find that /dev/discs/disc0/part1 is a symlink to /dev/scsi/host0/bus0/target0/lun0/part1

    You can just forget about this junk mounting. It doesn't harm anything.

    If you do care about it, create fstab . Then it will disappear.

  8. #23
    Quote Originally Posted by al37919 View Post
    It doesn't harm anything.
    Yes it does in some way...

    What is actually happening is that when /tmp/mnt/disc0_1
    is mounted the stupid-ftpd would start somehow and as the result all of my files are exposed to WAN! I was trying to run a search to find this stupid-ftpd via Samba (from Windows) on the whole drive and could not find it...

    I did not get it where it is located and how it opens the 21 port to the WAN when it is not open in my post-firewall?

    Do you know?

  9. #24
    Join Date
    Feb 2007
    Location
    Moscow, Russia
    Posts
    3,805
    if you have /tmp/mnt/disc0_1 it means that you're using some of the last previews. Install preview 12. There is no stupid-ftpd in it anymore.

  10. #25
    Quote Originally Posted by al37919 View Post
    if you have /tmp/mnt/disc0_1 it means that you're using some of the last previews. Install preview 12. There is no stupid-ftpd in it anymore.
    Thanks, Could you please give me the link?

  11. #26
    Join Date
    Feb 2007
    Location
    Moscow, Russia
    Posts
    3,805

  12. #27
    I have the same problem that the /tmp/harddisk always mount first.

    Where should I save the fstab?

  13. #28
    Join Date
    Jul 2007
    Location
    Austria
    Posts
    1,336
    Quote Originally Posted by flim View Post
    I have the same problem that the /tmp/harddisk always mount first.

    Where should I save the fstab?
    I strongly suggest to search forum........
    fstab is stored in /tmp/etc

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 2
    Last Post: 27-04-2010, 09:47
  2. Exclusive AUTO INSURANCE! - Best Choice!
    By ireneaveline in forum German Discussion - Deutsch (DE)
    Replies: 0
    Last Post: 06-09-2007, 04:10
  3. WL-500gP with a WD my book pro II 1TB I/O errors
    By golem in forum WL-500gP Q&A
    Replies: 1
    Last Post: 14-06-2007, 21:14
  4. Firewall dies
    By confused in forum WL-500g Q&A
    Replies: 0
    Last Post: 04-11-2006, 18:09

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •