Problems with mounting drive at boot
Hi,
I have problems with mounting my second drive at boot. (sorry i am a noob) When i use the mount command like this: Code:
mount -t ext3 /dev/sdb2 /mnt/HD/HD_b2 I already tryed to add to fstab with. Code:
nano /etc/fstab Code:
/dev/sdb2 /mnt/HD/HD_b2 ext3 defaults,errors=remount-ro 0 1 Code:
UUID=553afede-fa45-4cdc-9972-c0a9aa899509 /mnt/HD/HD_b2 ext3 errors=remount-ro 0 1 When i open /etc/mtab Code:
rootfs / rootfs rw 0 0 Code:
/dev/loop0: TYPE="squashfs" The funny thing is, i already installed it this way 2 years a go, had to reinstall (becaus i F* up trying stuff ;-) ) Then i got it to work, but dont remember how i solved it. Already spent a lot of hours trying to solve it. Hope you guys can help me out. |
Simple things first.
Does the directory /mnt/HD/HD_b2 exist? Run; Code:
ls /mnt/HD I ask because it is a common error. Myself, seeing how you have only 6 partitions, I would not have a /mnt/HD directory at all. I would first; label all partitions; second have a directory in /mnt of each of them. Labels like 1a, 1b, 2a, 2b and so on. Giving you /mnt/1a, /mnt/1b, etc. Usual practice has drives and such mounted in /media but that is up to you. My /mnt is pretty much mount points for chroot environments. And as I have never used raid I will admit things could well be done differently when that is being used. |
Quote:
|
Quote:
Quote:
HD_a2 HD_b2 And for the stucture, you are right, but its just consmetic, dont have to work a lot on this NAS. And i am the only 1 that use it (home). And thanks for the fast replay. |
Quote:
Code:
rootfs / rootfs rw 0 0 |
Quote:
Silly question: are you sure you're saving the file properly after you edit it? BTW, when you say it's empty, you mean the file is completely blank or only the line for this partition has been removed? And one more thing, could you post your complete fstab file here? |
Quote:
Did you checked for files and directories in /mnt/HD/HD_b2 before trying manual mount? |
Quote:
Its completely blank. Want to upload the file (fstab) but attachment(site) doesnt let me, but it realy compleetly empty, if i for example put in a compleetly wrong line in the fstab file on purpose, and i type mount -a , i get a error, [mntent]: line 1 in /etc/fstab is bad So i think fstab is in the right location/ name. Quote:
Code:
root@dlink:~# cd /mnt/HD/HD_b2 Code:
root@dlink:~# mount -t ext3 /dev/sdb2 /mnt/HD/HD_b2 Code:
root@dlink:/mnt/HD/HD_b2# ls Note: i changed real dir names here to dir1,dir2,dir3,dir4 |
Wild guess, you may be trying to mount as a user, so you need user permission in the options.
/etc/fstab /dev/sdb2 /mnt/HD/HD_b2 ext3 rw,user,errors=remount-ro 0 1 |
Quote:
Is there a work around that i just use the following mount command at boot? putting it in a script some where? mount -t ext3 /dev/sdb2 /mnt/HD/HD_b2 because above command works after boot, on the command line, then the partition is mounted Edit: I have edit /boot/linuxrc i put following line in it /etc/init.d/mediaservers.sh in mediaservers.sh i put the following line su root -c "mount -t ext3 /dev/sdb2 /mnt/HD/HD_b2" (mediaservers.sh is were i start program's) now after a reboot the partition is mounted..... But can i call this a solve? (for this topic) because it solved it for me |
Quote:
Code:
cat /etc/fstab |
Quote:
Code:
root@dlink:/etc/openvpn# cat /etc/fstab |
OK, I'll bite.
Why; Code:
root@dlink:/etc/openvpn# Just exactly what system are you using? This is a Debian version? What does your user ($) terminal have to say if you just open it normally? Should look similar to; Code:
sam@lounge:~$ Code:
cat /etc/fstab |
Quote:
i found the problem.... sorry i am a noob at this. I am using a NAS DNS-325 in order to run somthing els then the standaard browser, i installed fun_plug , this comes with a file (fun_plug) that you put on your root of you NAS to started Fun_plug allows the user to start additional programs and tools on the NAS. A Berlin-based developer named “Fonz” created a package called “ffp” (Fonz fun_plug), which includes the script and some extra software which can be invoked by fun_plug. After i installed Fonz fun_plug, i used this to install debian, this requered a other fun_plug file on my harddisk. After this i updated it to Debian 7. I totally forgot about that file (fun_plug), this file is responsible for the problems i had, because it rm fstab, and makes a empty fstab. Code:
#!/bin/sh for root@dlink:/etc/openvpn# I am trying to get openvpn to work, so after your question, i run your command, while i was busy with openvpn, thats why you see me in that dir. Thanks for the help!!!! (all you guys) |
Did you install nas from that site or from the Wheezy repo?
While this "fun_plug" sounds interesting it would be a better policy to just use packages from the Debian repos. This will give you less trouble and allow you to learn in an unbroken system. On the other hand; A> it is your box B> you learn a lot in a broken system and it is more exciting |
All times are GMT -5. The time now is 11:13 AM. |