Unix/Linux Go Back    


Fedora is an operating system centered on the Linux open source kernel and is developed by the community-supported Fedora Project. Fedora is sponsored by Red Hat. Fedora contains software distributed under a free and open-source license. Fedora focuses on innovation, integrating and adopting new technologies and working closely with various Linux communities. The default desktop in Fedora is the GNOME desktop environment and the default user interface is the GNOME Shell. Other desktop environments include KDE Plasma, Xfce, LXDE, MATE and Cinnamon. Security is an important aspect of Fedora with one specific security feature, Security-Enhanced Linux, implementing a variety of software security policies, including mandatory access controls.

Fstab for 2nd hdd, how to?

Fedora


Closed    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 04-02-2016
1in10's Unix or Linux Image
1in10 1in10 is offline
Registered User
 
Join Date: Jun 2014
Last Activity: 1 April 2017, 9:44 PM EDT
Location: Brazil
Posts: 121
Thanks: 38
Thanked 4 Times in 4 Posts
Fstab for 2nd hdd, how to?

once again, mounting another volume or hdd the fstab-file is giving me a headache. May someone could give me a hint how to configure the fstab-file properly to use the hdd.
The following

Code:
ls -l /dev/disk/by-uuid

is giving me this

Thats the UUID for /dev/sdb1 with the name "save"

Code:
6638df0e-22a9-4f70-9b77-93d40cbf9e5e

This is what it shows typing

Code:
 # fdisk -l


Code:
Device     Boot Start        End    Sectors   Size Id Type
/dev/sdb1        2048 1953523711 1953521664 931,5G 8e Linux LVM


Code:
root@tractor4:/dev# blkid
/dev/sda5: UUID="ba5eb72f-bbf9-4737-82f2-0fd1551cab61" TYPE="swap" PARTUUID="246b9537-05"
/dev/sdb1: LABEL="save" UUID="6638df0e-22a9-4f70-9b77-93d40cbf9e5e" TYPE="ext2" PARTUUID="000f1893-01"
/dev/sda1: UUID="b321e7fe-1149-419c-a841-ce2ea705c477" TYPE="ext4" PARTUUID="246b9537-01"

Thats how the fstab-file looks like now.


Code:
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda1 during installation
UUID=b321e7fe-1149-419c-a841-ce2ea705c477 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
UUID=ba5eb72f-bbf9-4737-82f2-0fd1551cab61 none            swap    sw              0       0

So how to enter the /dev/sdb1?


Code:
<file system>   <mount point>       <type>    <options>  <dump> <pass>
/dev/sdb1              /usr          ext4      auto rw     0      1

Thanks in advance!!!
Sponsored Links
    #2  
Old Unix and Linux 04-02-2016
RudiC RudiC is offline Forum Staff  
Moderator
 
Join Date: Jul 2012
Last Activity: 28 April 2017, 2:28 AM EDT
Location: Aachen, Germany
Posts: 10,703
Thanks: 263
Thanked 3,284 Times in 3,025 Posts
Doesn't it work the way you pointed out in the last paragraph? What happens? And, what happens if you enter it like
Code:
UUID=6638df0e-22a9-4f70-9b77-93d40cbf9e5e	/usr	ext2	auto rw 	0	1

Sponsored Links
    #3  
Old Unix and Linux 04-02-2016
RudiC RudiC is offline Forum Staff  
Moderator
 
Join Date: Jul 2012
Last Activity: 28 April 2017, 2:28 AM EDT
Location: Aachen, Germany
Posts: 10,703
Thanks: 263
Thanked 3,284 Times in 3,025 Posts
You mayhap should make sure you enter the correct file system type
    #4  
Old Unix and Linux 04-02-2016
1in10's Unix or Linux Image
1in10 1in10 is offline
Registered User
 
Join Date: Jun 2014
Last Activity: 1 April 2017, 9:44 PM EDT
Location: Brazil
Posts: 121
Thanks: 38
Thanked 4 Times in 4 Posts
new attempt, ext2 is the fliesystem, thats correct

I tried it like this, to mount it at boot. But this entry in fstab


Code:
# /dev/sdb1: LABEL="save"
UUID="6638df0e-22a9-4f70-9b77-93d40cbf9e5e        /dev/sdb1           ext2     auto        0       1

tells me that the special device is not available.

I have to translate this into english, the installation I made is not english.


Trying again, needing more coffee and chocolate, because its a riddle, that I still use an mp3-player bought back in 2009, that since then never caused any trouble plugging it in, on Ubuntu, BSD, Fedora and Debian. This tiny mp3-player and its software is made by a well known japanese OEM brand. So what is the riddle with that fstab to not recognize a OEM brand hdd. Last attempt threw me back to rescue mode. An unknown device, blinking initfs or ramfs, not even rebooting was accepted.

rethinking the mount point, as my fstab tells me root is at /, I typed into the fstab a mountpoint that is given by the command

Code:
 blkid

in the /etc folder, but trying as root to mount just like this

Code:
 mount /dev/sdb1

once again I am told the special device is not there. Yep, very special.
So the root acts like this

Code:
root@tractor4:/etc# blkid
/dev/sdb1: LABEL="save" UUID="6638df0e-22a9-4f70-9b77-93d40cbf9e5e" TYPE="ext2" PARTUUID="000f1893-01"
/dev/sda1: UUID="e2255ef4-f184-402f-8d1b-19b3383ba3e3" TYPE="ext4" PARTUUID="b5bb2799-01"
/dev/sda5: UUID="5d503d09-71c0-4b00-8ed1-4b28239d4462" TYPE="swap" PARTUUID="b5bb2799-05"

The fstab looks now like this


Code:
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda1 during installation
UUID=e2255ef4-f184-402f-8d1b-19b3383ba3e3 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
UUID=5d503d09-71c0-4b00-8ed1-4b28239d4462 none            swap    sw                0       0
# /sdb1 on /dev/sdb1
UUID="6638df0e-22a9-4f70-9b77-93d40cbf9e5e /dev/sdb1      ext2    auto,rw           0       1

I already tried default as an option, dump set to 2, it remains unreadable. So, if someone has got a better hint than wiki for fstab on unix-like systems, I would appreciate it.

Last edited by 1in10; 04-02-2016 at 10:38 PM.. Reason: a third attempt
Sponsored Links
    #5  
Old Unix and Linux 04-03-2016
RudiC RudiC is offline Forum Staff  
Moderator
 
Join Date: Jul 2012
Last Activity: 28 April 2017, 2:28 AM EDT
Location: Aachen, Germany
Posts: 10,703
Thanks: 263
Thanked 3,284 Times in 3,025 Posts
This is not what I asked you to try. You can't mount a device to itself.
The Following User Says Thank You to RudiC For This Useful Post:
1in10 (04-05-2016)
Sponsored Links
    #6  
Old Unix and Linux 04-05-2016
1in10's Unix or Linux Image
1in10 1in10 is offline
Registered User
 
Join Date: Jun 2014
Last Activity: 1 April 2017, 9:44 PM EDT
Location: Brazil
Posts: 121
Thanks: 38
Thanked 4 Times in 4 Posts
setting fstab options to defaults, no reply at all

May the moderator should move this thread to BSD, because it did not work at all an linux.
I set in on the mountpoint /dev/usr and after rebooting the boot-routine told me, that the second hdd was not unmounted correctly.
Systemd forced a fsck for the 2nd hdd and after not even half of the 2nd volume I was stuck on a black screen with a cursor.

On linux it did not work at all. I guess even trying to replace systemd is quite a task, not to disturb the runnig system. So on linux with systemd for the enthusiasts of their distro they may try the following commands one after another and have a look at it.


Code:
systemd-analyze
systemd-analyze blame 
systemd-analyze critical-chain 
systemd-analyze dot | dot -Tsvg > systemd.svg
systemd-analyze plot > bootplot.svg

So I am fighting my way through bsd where to mount that hdd properly in the fstab. Here is the actual output of my fstab on bsd.


Code:
# Device                Mountpoint            FStype        Options    Dump Pass
/dev/label/swap0.eli    none                swap        sw        0     0
procfs                    /proc                procfs        rw        0    0
linprocfs                /compat/linux/proc    linprocfs    rw        0    0

This is interesting, pluggin the hdd into the bsd machine it is recognized by gpart list, but not yet ready to be accessed. After
typing

Code:
pkg install fusefs-ext4fuse

there are two entries in the drop down menu for the same device. As far as I know ext2 is the basic for cooperation between linux and bsd. So now I do not have the rights, because this device has been installed in another machine with another root and user. So what can I do? Something like


Code:
chmod -R 777 ada1

yes, I remember one user on this forum telling me, that this is not the magical sledgehammer, but I need the data of the disk, it is about some years of work. And since I am working on my own machine as a single user, whats the matter with that?

this is what

Code:
gpart list

tells me about the second hdd.

Code:
Geom name: ada1
modified: false
state: OK
fwheads: 16
fwsectors: 63
last: 1953525167
first: 63
entries: 4
scheme: MBR
Providers:
1. Name: ada1s1
   Mediasize: 1000203091968 (932G)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r0w0e0
   rawtype: 142
   length: 1000203091968
   offset: 1048576
   type: linux-lvm
   index: 1
   end: 1953523711
   start: 2048
Consumers:
1. Name: ada1
   Mediasize: 1000204886016 (932G)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r0w0e0

So any hints to solve this problem? Many thanks in advance.

Last edited by 1in10; 04-06-2016 at 08:42 PM.. Reason: loader.conf on bsd
Sponsored Links
    #7  
Old Unix and Linux 04-06-2016
1in10's Unix or Linux Image
1in10 1in10 is offline
Registered User
 
Join Date: Jun 2014
Last Activity: 1 April 2017, 9:44 PM EDT
Location: Brazil
Posts: 121
Thanks: 38
Thanked 4 Times in 4 Posts
on bsd 10 the loader.conf in /dev

My next attempt (on bsd 10) after searching loader.conf in /boot was to set there
two lines fore ext2fs and ext4fs. So my loader.conf now looks like this


Code:
# * IMPORTANT NOTICE *
# Run 'grub-mkconfig -o /boot/grub/grub.cfg' after making changes to this file
###############################################################################
drm_load="YES"
vboxguest_load="YES"
vboxvideo_load="YES"
crypto_load="YES"
aesni_load="YES"
geom_eli_load="YES"
# Tune ZFS Arc Size - Change to adjust memory used for disk cache
vfs.zfs.arc_max="512M"
zfs_load="YES"
ext2fs_load="YES"
ext4fs_load="YES"
twdm2_enable="YES"

The last line was recommended after reinstalling ext2fs.
By the way, my shell allways sets my last commands to zero after rebooting, how to change that?
The up above notice to run


Code:
'grub-mkconfig -o /boot/grub/grub.cfg' after making changes to this file

did result in nothing, saying that the command


Code:
grub-mkconfig

was not found.
So what to do?

Every time I tried to mount the 2nd hdd, there appears the message, ain't got no rights to do so.
So installing the whole system again, at the point where you can add a disk, I did so, adding even a slice in the format ufs. But again, no rights to mount the volume.
As root in the termninal changing the fstab brings me even more trouble. Rebooting and I am hung in the recovery mode unable to comment the line out in the fstab. I guess this is due to sudo as a file in all that packages. Within the terminal I can modify the file, rebooting, sets me to nothing.
Reading about this, installing in /usr/ports etx2fs and ext4fs
which are already there. So the kernel-bakery was not necessary.
After that I moved on to
Code:
 /boot

looking at

Code:
loader.conf 
loader.conf.pcbsd 
loader.rc

By the way, I set in the first two under

Code:
# Load File-System Support
ext2fs_load="YES"
ext4fs_load="YES"

May I should apply as well to

Code:
# Load Linux compat
linux_lvm="YES"

I really don't know.

After that I had a look at
Code:
 /dev

where the second hdd is listed as
Code:
 ada1

and
Code:
 ada1s1

. So it is there.
After that looking at
Code:
 /etc/rc.conf

and
Code:
 rc.conf.pcbsd

The last one is warning not to write anything into it, 'cause updating the whole thing will overwrite it again. So any changes should be done in /etc/rc.conf

And right here in
Code:
 /etc

I see fstab. But I made this experience before, any changes to this file are leading to nothing. I guess the reason for this is an installed sudo (never mind on debian jessie you will have fakeroot, calif and sudo, so you may read all that complaints of apple users and sudo).
I once added a line to this fstab, and my day was done, hung up at reboot. Even changing file permissions to 775. So reinstall all that system again.
Now looking at gsmartcontrol, my 2nd disk is sound and safe, no bad blocks, it is just not accepted to mount it.

Reading now the freebsd manpage about gpart and another article, there is a hint to add a slice to the 2nd hdd, starting at 1MB, just to have another partition table other than mbr on it. I did so at reinstalling the sys, resulting in nothing again. So my next attempt would be to read the next days gpart and test it with an usb-stick, unless someone here has got another idea. To cut a long story short, is it a good idea to add a slice to the 2nd hdd, beside the mbr that is already there, just to gain access to it? Or how to copy the content and after that format it? And how to gain access to it? That is the crucial point.

Last edited by 1in10; 04-09-2016 at 08:03 PM.. Reason: setting it up again, starting all over again
Sponsored Links
Closed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
IBM AIX Internal HDD vs SAN HDD and Oracle filosophizer AIX 7 01-27-2014 05:33 AM
Old HDD copy to new HDD ? im lost... Chevy89rocks UNIX for Dummies Questions & Answers 5 02-20-2009 02:23 AM
Sco 5.06 How To Mount A 2nd Hdd Help Help!!!! josramon SCO 4 10-22-2008 06:06 AM
/etc/fstab byblyk Linux 6 07-07-2004 12:51 AM
dual boot solaris off of 2nd HDD dangral UNIX for Dummies Questions & Answers 3 11-21-2002 09:45 AM



All times are GMT -4. The time now is 11:59 AM.