LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   need to adjust /etc/fstab for to create a partition? (https://www.linuxquestions.org/questions/linux-newbie-8/need-to-adjust-etc-fstab-for-to-create-a-partition-4175680291/)

Kintaro 08-12-2020 01:50 AM

need to adjust /etc/fstab for to create a partition?
 
Hi guys,

im trying to create a partition on my sd-card.

After I use the parted commands, it says I might have to adjust /etc/fstab and when I open fstab it says:

# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda2 during installation
UUID=50d744c3-8c79-4a18-a2d9-171be9c3972b / ext3 errors=remount-ro 0 1
# /boot/efi was on /dev/sdb1 during installation
UUID=6C71-99B2 /boot/efi vfat umask=0077 0 1
/swapfile none swap sw 0 0
~



None of these devices is the sd-card I think. Can I just ignore it and go on with my work? And if so, does this have any relevance for my system/ is something that needs to be fixed?

I made a big screw up and had to reinstall Windows and Linux. Win on SSD Linux on HDD and Im not sure, if it all went smoothly.

Sry, if this thread turned into another topic, but for now, most important for me is, if I can just go on with working on the SD partitions.

Thanks,
K

syg00 08-12-2020 01:58 AM

The reason UUID is used in fstab is so you don't have to worry about things like this. So don't worry. If you want us to check, run this and post the output.
Code:

lsblk -f

berndbausch 08-12-2020 02:37 AM

Quote:

Originally Posted by Kintaro (Post 6155045)
Hi guys,

im trying to create a partition on my sd-card.

After I use the parted commands, it says I might have to adjust /etc/fstab

That depends. How did you format this card - did you just partition it or did you also put a filesystem on it?
Assuming the latter, you only need to adjust fstab if the SD card will be inserted permanently.

The main purpose of fstab is to automatically mount filesystems when the system starts. If /etc/fstab contains a line for the SD card and the card is not inserted when the system starts, the startup process won't complete in most cases.

In order to help you, we need to know:
  • did you put a filesystem on one of the SD card partitions?
  • if yes, do you plan to keep the SD card in the computer?
  • if yes, run lsblk -f as suggested by svg00. This will help us craft an /etc/fstab line.
Quote:

I made a big screw up and had to reinstall Windows and Linux. Win on SSD Linux on HDD and Im not sure, if it all went smoothly.
I guess that this has nothing to do with your SD card.

Kintaro 08-12-2020 04:00 AM

Thanks for your quick reply.
I ran it and this came out:

NAME FSTYPE LABEL UUID MOUNTPOINT
sda
├─sda1 ntfs Data 2A0A41040A40CF0F
├─sda2 ext3 50d744c3-8c79-4a18-a2d9-171be9c3972b /
└─sda3 swap 851e9ad8-e839-448c-8c37-bf613bf5a34c
sdb
├─sdb1 vfat ESP 6C71-99B2 /boot/efi
├─sdb2
├─sdb3 ntfs Acer 36F0725EF0722471
└─sdb4 ntfs Recovery DAD872F8D872D26D

pan64 08-12-2020 04:08 AM

Quote:

Originally Posted by Kintaro (Post 6155069)
Thanks for your quick reply.
I ran it and this came out:
Code:

NAME  FSTYPE LABEL    UUID                                MOUNTPOINT
sda                                                       
├─sda1 ntfs  Data    2A0A41040A40CF0F                   
├─sda2 ext3            50d744c3-8c79-4a18-a2d9-171be9c3972b /
└─sda3 swap            851e9ad8-e839-448c-8c37-bf613bf5a34c
sdb                                                       
├─sdb1 vfat  ESP      6C71-99B2                            /boot/efi
├─sdb2                                                     
├─sdb3 ntfs  Acer    36F0725EF0722471                   
└─sdb4 ntfs  Recovery DAD872F8D872D26D


ok, so you see now the UUIDs, you need to use those in fstab, like this:
Code:

UUID=<your UUID> <mount point> <FSTYPE> umask=0077 0 0

Kintaro 08-12-2020 04:12 AM

Quote:

Originally Posted by berndbausch (Post 6155055)
In order to help you, we need to know:
  • did you put a filesystem on one of the SD card partitions?
  • if yes, do you plan to keep the SD card in the computer?
  • if yes, run lsblk -f as suggested by svg00. This will help us craft an /etc/fstab line.

I did put a FAT32 file system on the card, but formatted it again after that. Does this change the previous file system?
Im not planning to keep it in the computer. Im formatting it to install NOOBS for the raspberry pi and use the card in it.

syg00 08-12-2020 04:15 AM

ok, so that looks good for linux. If you merely want to create a partition on the SDCard for data or testing or whatever (not you linux system itself), no problem. You shouldn't need a fstab entry - when you plug it in linux (udev) will mount it automatically.

There are other possibilities, so if you have a different use case, please explain so we can add comments.

:doh: - too slow typing again. No, no problem - just use it for pi and don't worry about fstab.

Kintaro 08-12-2020 04:16 AM

Quote:

Originally Posted by pan64 (Post 6155071)
ok, so you see now the UUIDs, you need to use those in fstab, like this:
Code:

UUID=<your UUID> <mount point> <FSTYPE> umask=0077 0 0

Ok, sorry but thats not clear for me.

Where do I write these lines in fstab? And do I just switch the UUID for the UUID that is shown in fstab?
And how do I simply write <mount point> and <FSTYPE> or are these placeholders?

Im guessing the latter, but I wouldnt know where to mount them, because Im not even sure, what these UUID's belong to.

Total noob I know :D

pan64 08-12-2020 04:21 AM

lsblk prints fstype too, that should be ok.
mount point is a directory where you can see the given partition.

and you can add a new line at the end of the file fstab.
You need to be careful because an incorrect fstab may cause booting problems.

michaelk 08-12-2020 04:25 AM

As stated you do not need to change your fstab file and you do not want to mount the card to install noobs either. Follow the instructions on the Raspberry Pi website.

Kintaro 08-12-2020 04:26 AM

Ok, thanks.

and what exactly would happen or be the advantage, if I execute these steps?

If it's risky I might want to consider, if it's worth it

pan64 08-12-2020 04:32 AM

I do not really understand what do you want to achieve, but if you want to put NOOB onto the card better to follow the original instructions (see post #19).
I think you need to learn first these format/mount related things.

michaelk 08-12-2020 04:44 AM

No advantage. Ubuntu and most distributions will automatically mount external media when inserted. If the card is not intended to be kept in the same computer as stated it could stop the boot process when trying to mount the card when not inserted.

It isn't risky but not not worth it either.

Kintaro 08-12-2020 05:03 AM

Quote:

Originally Posted by pan64 (Post 6155083)
I do not really understand what do you want to achieve, but if you want to put NOOB onto the card better to follow the original instructions (see post #19).
I think you need to learn first these format/mount related things.

I did follow the original instructions, but it didnt work. What Im doing here in this post is just a sidequest of troubleshooting.

pan64 08-12-2020 05:07 AM

Quote:

Originally Posted by Kintaro (Post 6155092)
I did follow the original instructions, but it didnt work. What Im doing here in this post is just a sidequest of troubleshooting.

instruction to do what? can you post a link?


All times are GMT -5. The time now is 10:44 PM.