Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: How to mount a partiton

  1. #1

    Default How to mount a partiton

    I have googled and found yast partitioner can do it.

    I tried twice, and both times it ended, with me not being able to log in, and having to start from a snapshot to get back in.



    Partition sdb5, almost 30 gig is the one.

    Code:
    sudo blkid 
    [sudo] wachtwoord voor root:  
    /dev/sda1: LABEL="Herstel" BLOCK_SIZE="512" UUID="A63A73D93A73A549" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="30a4fa2a-4d6a-49f6-b576-f85c3c39644b" 
    /dev/sda2: UUID="9474-CF21" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="70e1d660-fa10-4c6b-af84-2f6220bf4308" 
    /dev/sda3: PARTLABEL="Microsoft reserved partition" PARTUUID="0f63e829-852b-4034-97c7-0d95b4013ac1" 
    /dev/sda4: BLOCK_SIZE="512" UUID="EA0E76BE0E76837D" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="5927130e-8679-43f1-9d62-5d879be74451" 
    /dev/sdb1: UUID="9A90-3F07" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="a986b7af-7e9a-4f0a-a483-a57562332f53" 
    /dev/sdb2: UUID="5a26a5e5-5a43-4deb-9eae-f6e82d358dc2" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="4001277c-e5f4-4312-b7a0-ec9ce2a8aba7" 
    /dev/sdb3: UUID="64d5c6b8-8098-497b-b56a-beb464958102" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="6ff8609f-3e67-4523-81a8-1340953daba5" 
    /dev/sdb4: UUID="9f94c7ef-ce94-4d99-8ebd-187f0d37b0e1" TYPE="swap" PARTUUID="f807f567-763c-4238-b024-4ac78866afda" 
    /dev/sdb5: UUID="b9cf1de0-e38d-46a4-ba88-08665ca8d340" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="3e75a9fd-3629-41c9-bfbc-fdd2a166a01d" 
    /dev/nvme0n1p1: UUID="3AB8-553F" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="e309de90-d4c1-41a4-bf93-1838b4eeb944" 
    /dev/nvme0n1p2: UUID="9c8140f9-0b81-41eb-ab94-d7342c38d218" UUID_SUB="516ade50-eb26-462b-9e77-8fd81a3fe2d5" BLOCK_SIZE="4096" TYPE="btrfs" PARTUUID="72155361-856f-4c12-8325-119e9b78931c" 
    guus@a183222:~> ls disk
    
    

    Code:
    sudo fdisk -l 
    Schijf /dev/sda: 931,51 GiB, 1000204886016 bytes, 1953525168 sectoren
    Disk model: WDC WD10EZEX-08W 
    Eenheid: sectoren van 1 * 512 = 512 bytes 
    Sectorgrootte (logisch/fysiek): 512 bytes / 4096 bytes 
    In-/uitvoergrootte (minimaal/optimaal): 4096 bytes / 4096 bytes 
    Schijflabeltype: gpt 
    Schijf-ID: 9B2B0727-8EF2-458A-8CD7-5E13FF3E9BCB 
    
    Apparaat  Begin     Einde  SectorenGrootteType
    /dev/sda1     2048    1085439    1083392    529M Windows recovery-omgeving 
    /dev/sda2  1085440    1288191     202752     99M EFI-systeem 
    /dev/sda3  1288192    1320959      32768     16M Microsoft gereserveerd 
    /dev/sda4  1320960 1953523711 1952202752  930,9G Microsoft basisgegevens 
    
    
    Schijf /dev/sdb: 931,51 GiB, 1000204886016 bytes, 1953525168 sectoren
    Disk model: ST1000DM010-2EP1 
    Eenheid: sectoren van 1 * 512 = 512 bytes 
    Sectorgrootte (logisch/fysiek): 512 bytes / 4096 bytes 
    In-/uitvoergrootte (minimaal/optimaal): 4096 bytes / 4096 bytes 
    Schijflabeltype: gpt 
    Schijf-ID: 23C3467D-1C13-4ADF-919A-A8FFAE6766D6 
    
    Apparaat     Begin     Einde  SectorenGrootteType
    /dev/sdb1        2048    1050623    1048576    512M EFI-systeem 
    /dev/sdb2     1050624  103442431  102391808   48,8G Linux bestandssysteem 
    /dev/sdb3   164882432 1949329407 1784446976  850,9G Linux bestandssysteem 
    /dev/sdb4  1949329408 1953525134    4195727      2G Linux wisselgeheugen 
    /dev/sdb5   103442432  164882431   61440000   29,3G Linux bestandssysteem 
    
    Partitietabel-items liggen niet in schijfvolgorde. 
    
    
    Schijf /dev/nvme0n1: 931,51 GiB, 1000204886016 bytes, 1953525168 sectoren
    Disk model: Samsung SSD 980 1TB                      
    Eenheid: sectoren van 1 * 512 = 512 bytes 
    Sectorgrootte (logisch/fysiek): 512 bytes / 512 bytes 
    In-/uitvoergrootte (minimaal/optimaal): 16384 bytes / 131072 bytes 
    Schijflabeltype: gpt 
    Schijf-ID: 63581BC3-DBCF-4810-AF9F-C94FBB91E551 
    
    Apparaat  Begin     Einde  SectorenGrootteType
    /dev/nvme0n1p1    2048    1050623    1048576    512M EFI-systeem 
    /dev/nvme0n1p2 1050624 1953525134 1952474511    931G Linux bestandssysteem
    
    
    

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    32,129
    Blog Entries
    15

    Default Re: How to mount a partiton

    Hi
    So as root user does the following work;

    Code:
    su -
    mount /dev/sdb5 /mnt
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  3. #3

    Default Re: How to mount a partiton

    I think it does:

    Code:
    su - 
    Wachtwoord:  
    a183222:~ # mount /dev/sdb5 /mnt 
    a183222:~ #
    
    To see if it was mounted , I looked with Dolphin, and it did not ask me for the root password, so its mounted.

    Now I need to edit fstab ?

  4. #4
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    32,129
    Blog Entries
    15

    Default Re: How to mount a partiton

    Quote Originally Posted by Gps2010 View Post
    I think it does:

    Code:
    su - 
    Wachtwoord:  
    a183222:~ # mount /dev/sdb5 /mnt 
    a183222:~ #
    
    To see if it was mounted , I looked with Dolphin, and it did not ask me for the root password, so its mounted.

    Now I need to edit fstab ?
    Hi
    So what do you want to call the directory it mounts to (don't use /mnt)?

    For example I have a partition mounted as /extra

    In the firast instance as root user umount the device and sync

    Code:
    su -
    cd
    sync
    umount /mnt
    sync
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  5. #5

    Default Re: How to mount a partiton

    Reading this post after my pc was rebooted, so it was already unmounted.

    That sync part though, that took me some googling, and I am still not getting it.

    sync command in Linux is used to synchronize cached writes to persistent storage.
    What does this mean ? Something out of the memory gets written to disk ?


    Don' t know what to call that folder, maybe virtual? because it's for a virtual machine ?


    Edit:
    Found a better explanation of sync:
    https://www.computerhope.com/unix/sync.htm
    By default, the Linux kernel writes data to disk asynchronously. Writes are buffered (cached) in memory, and written to the storage device at the optimal time. The sync command forces an immediate write of all cached data to disk.

  6. #6

    Default Re: How to mount a partiton

    To make this mount shutdown proof, do I need to edit fstab ?

    Or should it be done a different way ?

    https://en.opensuse.org/SDB:Mount_additional_disk

    Will chown make it permanently ?

  7. #7
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    32,129
    Blog Entries
    15

    Default Re: How to mount a partiton

    Hi
    So did you decide on a mount point directory name?

    You indicated no luck with YaST Partitioner? Did you select the disk partition, then in the actual part to add set to not format? In the partition mount point did you type in the directory name you wanted (no the drop down list), eg /foobar
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  8. #8

    Default Re: How to mount a partiton

    I could try again, I do not remember setting a name, if I recall right it would be mounted to home.

    Been wondering, there is nothing on that partition yet, so I could choose format.

    The weird part, twice yast started the process but hen would spit out an error after 10 seconds or so.
    After a reboot at the password screen, I entered my password, but instead of showing the desktop, it would flash and show me back the password screen again.
    I then did a rollback.

    Maybe creating a new folder with a unique name will fix the yast problem.

    I was thinking calling it virtual or VM. But does is matter were I create that folder ?
    Should it be in /etc ?

  9. #9
    Join Date
    Jun 2011
    Location
    Germany
    Posts
    518

    Default Re: How to mount a partiton

    Quote Originally Posted by Gps2010 View Post
    I was thinking calling it virtual or VM. But does is matter were I create that folder ?
    Should it be in /etc ?
    Actually, that is totally up to your liking. Here is a basic idea of the file system in Unix / Linux:
    https://www.linux.com/training-tutor...tem-explained/
    As it is your system you can do what you want, it may just be be advisable to avoid the system folders resp.. the system folder names as that could cause issues. Therefore I'd not put anything into /etc/... as that is the system's most important folder for settings and configurations.
    On the other hand, you can just create a folder /virtualmachine (or whatever) just in the / directory. Purists may say that nothing should be added to / but - so what? You'll be sure that no system process of your host inadvertently touches it. You might also put it into /home/ if that suits your backup policy.

  10. #10

    Default Re: How to mount a partiton

    I now get it, and will try. Been wondering about why the partitioner freaked out.

    If this happens again, I will see if I can fix it, instead of rebooting.

    I read the link.
    In the good? old days I would have placed my folder in mount. Now I will probably do it in /home and call it VMmount.

    Reading it reminded me of working with an IBM cad system, at an airplane company (Fokker)
    The Cad program called cadam, run on a UNIX workstation, connected to a mainframe.

    Who would have thought back then, that one day this stripes / at home, woud point the same direction, not the c way.
    Slightly off topic, I remember one day, asking about the / vs \ .
    Some colleagues only laughed at me and told me it was not windows.
    I replied, that I had figured out that much, but then what was the operating system?
    I swear, big silence, almost nobody knew.
    Then an English contractor came to me, and asked if I had a problem. I said no problem, but those stripes what is the OS?
    He said it was probably UNIX, but he had no idea about any further details.

    The part about the /usr directory triggered the memory. All cad operators had their own folder in which we could do all and store the drawings we were working on.
    /45773
    /56423
    /75861

    Back on topic, gonna create a folder called VMmount, and see if yast partitoner will mount it.
    Also make sure first its not mounted already.

Page 1 of 2 12 LastLast

Posting Permissions

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