LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-29-2021, 04:38 PM   #1
beltza73
LQ Newbie
 
Registered: Oct 2021
Posts: 6

Rep: Reputation: Disabled
permission denied. SSD. Raspberry. Owner change


I have installed an SSD drive in my new Raspberry pi 4 (Argon ONE m.2 box).
I have done it following this instructions:
https://thepihut.com/blogs/raspberry...e-raspberry-pi
Everything went fine. But now, I can see the directory of the SSD, but cannot write in it. I don't have permissions. I use "pi" user.
Write button click on the folder says that only owner has permission for changing content.... How can I change this permissions?
Thanks in advance
 
Old 10-29-2021, 08:35 PM   #2
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally Posted by beltza73 View Post
I have installed an SSD drive in my new Raspberry pi 4 (Argon ONE m.2 box).
I have done it following this instructions:
https://thepihut.com/blogs/raspberry...e-raspberry-pi
Everything went fine. But now, I can see the directory of the SSD, but cannot write in it. I don't have permissions. I use "pi" user.
Write button click on the folder says that only owner has permission for changing content.... How can I change this permissions?
Thanks in advance
Does it allow you to open the desktop and run a program like Terminal? If so shows us the output of the ls -l /home/ and the ls -l ~ commands. That will confirm you have changed the permissions correctly. Also does it boot with only the SSD connected? The output of the sudo fisk -l in Terminal would be nice to see too, it will give use idea of the layout of the disk. The mount | grep /dev

Code:
zeus@bullseye-raspi:~$ ls -l /home/
total 4
drwxr-xr-x 9 zeus zeus 4096 Oct 26 10:35 seeder1
zeus@bullseye-raspi:~$ ls -l ~
total 8
drwxr-xr-x  3 zeus zeus 4096 Aug 20 13:23 bin
drwxr-xr-x 13 zeus zeus 4096 Sep 13 19:05 rtorrent
zeus@bullseye-raspi:~$ mount | grep /dev
udev on /dev type devtmpfs (rw,nosuid,relatime,size=3949232k,nr_inodes=987308,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
/dev/sda2 on / type ext4 (rw,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
/dev/sda1 on /boot/firmware type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro)
/dev/sdb1 on /home/seeder1/rtorrent type ext4 (rw,relatime)

root@bullseye-raspi:~# fdisk -l
Disk /dev/sda: 111.79 GiB, 120034123776 bytes, 234441648 sectors
Disk model: ASM105x         
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 33553920 bytes
Disklabel type: gpt
Disk identifier: D8A96088-5191-480A-9498-EE006223808B

Device      Start       End   Sectors   Size Type
/dev/sda1      40    409639    409600   200M EFI System
/dev/sda2  409640 234441614 234031975 111.6G Linux filesystem


Disk /dev/sdb: 5.46 TiB, 6001175126016 bytes, 11721045168 sectors
Disk model: 2115            
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: A961D077-E544-114D-AE7F-37227862FC0B
As you can see from the output of my commands my users is named zeus, everything for his directories is owned by it. The mount shows I have my "/" partition on /dev/sda2 and the firmware partition on the /dev/sda1. The fdisk shows the SSD is partitioned as GPT scheme with the /dev/sda1 marked as a EFI System partition. I also have an additional disk for storage.

Now when I first did my cloning to the SSD I used a tool in the Desktop menu I forget the exact name but it was something about a clone install tool. Look around for that and let it try to do it, it makes exact copy of the files on your card to the SSD and allows it to boot with everything correct. If you cannot get that tool working properly I can give you commands that will duplicate your install without problems it is a simple process that I do on every major upgrade to backup to spare SSD that is used to upgrade the system so I always have working backup copy ready to go in an instant.
 
Old 10-29-2021, 09:18 PM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,751

Rep: Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929
It looks like the posted guide is a bit wrong. Your changing the permissions of the directory on the / partition and not the filesystem on the SSD.

Mount the filesystem
sudo mount /dev/sda1 /home/pi/myssd
sudo chown pi:pi /home/pi/myssd

At the moment I do not see the need to make the drive world writable.
 
Old 10-30-2021, 02:47 PM   #4
beltza73
LQ Newbie
 
Registered: Oct 2021
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
It looks like the posted guide is a bit wrong. Your changing the permissions of the directory on the / partition and not the filesystem on the SSD.

Mount the filesystem

pi@raspberrypi:~ $ sudo mount /dev/sda1 /home/pi/GureSSD
mount: /home/pi/GureSSD: mount point does not exist.

pi@raspberrypi:~ $ sudo chown pii /home/pi/GureSSD
chown: ezin da '/home/pi/GureSSD'-ra sartu: No such file or directory


At the moment I do not see the need to make the drive world writable.
There you have the answers.... Thanks for your help
 
Old 10-30-2021, 03:34 PM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,751

Rep: Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929
You need to create the directory first.

mkdir /home/pi/GureSSD

Use the same directory name that you used previously.

Last edited by michaelk; 10-31-2021 at 07:28 AM.
 
Old 10-31-2021, 03:33 PM   #6
beltza73
LQ Newbie
 
Registered: Oct 2021
Posts: 6

Original Poster
Rep: Reputation: Disabled
Thanks michaelk for your answers.

Y have done the mkdir command, and now I can see to folders in the file browser with that name. One a simple folder and the other the SSD. Ad I am still not able to write in this.

Could be the problem this? If I right click on the SSD folder in the file browser, and select properties, I can see what follows:
file: niressd
Name: GureSSD

And of course I can't change the name...
 
Old 10-31-2021, 04:44 PM   #7
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
Here is how to do it guaranteed. Boot with the sdcard in the Pi then the following commands use sudo in front of them if you have not enabled the root user. From my notes on installing buster on my SSD copied from the sdcard onto it. These will work with any version of OS except the Windows as I have never tried that build.

Code:
root@rpi4-20201112:/home/seeder1# mkdir /tmp/ssdboot
root@rpi4-20201112:/home/seeder1# mkdir /tmp/ssdroot
Those two make the directories for the copy process mount points.

Code:
root@rpi4-20201112:/home/seeder1# blkid   
/dev/mmcblk1p1: SEC_TYPE="msdos" LABEL_FATBOOT="RASPIFIRM" LABEL="RASPIFIRM" UUID="AC25-5007" TYPE="vfat" PARTUUID="8ed03b0d-01"
/dev/mmcblk1p2: LABEL="RASPIROOT" UUID="cce1d06d-e567-4b48-a624-e823b516507f" TYPE="ext4" PARTUUID="8ed03b0d-02"
/dev/sda2: UUID="4a349c2c-0df5-4fdb-a99f-906423554de9" TYPE="ext4" PARTUUID="59097f66-f9fb-4a50-a491-8a71becaa2bd"
/dev/mmcblk1: PTUUID="8ed03b0d" PTTYPE="dos"
/dev/sda1: SEC_TYPE="msdos" UUID="3651-174E" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="9fad4e77-177d-4a3c-929a-3897e6bc1810"
That command gets the needed UUIDs for the SSD to edit the /etc/fstab if you do not use the LABEL= method for it when booting from the SSD.

Code:
root@rpi4-20201112:/home/seeder1# mount /dev/sda1 /tmp/ssdboot 
root@rpi4-20201112:/home/seeder1# mount /dev/sda2 /tmp/ssdroot
root@rpi4-20201112:/home/seeder1# cp -av /boot/firmware/* /tmp/ssdboot/
'/boot/firmware/bcm2711-rpi-4-b.dtb' -> '/tmp/ssdboot/bcm2711-rpi-4-b.dtb'
'/boot/firmware/bcm2837-rpi-3-a-plus.dtb' -> '/tmp/ssdboot/bcm2837-rpi-3-a-plus.dtb'
'/boot/firmware/bcm2837-rpi-3-b-plus.dtb' -> '/tmp/ssdboot/bcm2837-rpi-3-b-plus.dtb'
'/boot/firmware/bcm2837-rpi-3-b.dtb' -> '/tmp/ssdboot/bcm2837-rpi-3-b.dtb'
'/boot/firmware/bcm2837-rpi-cm3-io3.dtb' -> '/tmp/ssdboot/bcm2837-rpi-cm3-io3.dtb'
snip...
root@rpi4-20201112:/home/seeder1# rsync -ahPHAXx --delete --exclude={/boot/firmware/*,/dev/*,/proc/*,/sys/*,/tmp/*,/run/*,/mnt/*,/media/*,/lost+found} / /tmp/ssdroot/
sending incremental file list
./
bin -> usr/bin
initrd.img -> boot/initrd.img-5.8.0-0.bpo.2-arm64
initrd.img.old -> boot/initrd.img-5.8.0-0.bpo.2-arm64
lib -> usr/lib
snip...
Those commands mount the SSD partitions to their copying mount points then do the copy of the files.


Code:
root@rpi4-20201112:/home/seeder1# nano /tmp/ssdroot/etc/fstab
root@rpi4-20201112:/home/seeder1# cat /tmp/ssdroot/etc/fstab
# The root file system has fs_passno=1 as per fstab(5) for automatic fsck.
#LABEL=RASPIROOT / ext4 rw 0 1
PARTUUID=59097f66-f9fb-4a50-a491-8a71becaa2bd / ext4 rw 0 1
# All other file systems have fs_passno=2 as per fstab(5) for automatic fsck.
#LABEL=RASPIFIRM /boot/firmware vfat rw 0 2
PARTUUID=9fad4e77-177d-4a3c-929a-3897e6bc1810 /boot/firmware vfat rw 0 2

# the /proc filesytem
proc /proc proc defaults 0 0
The /etc/fstab edited to boot with the UUID method.

Code:
root@rpi4-20201112:/home/seeder1# nano /tmp/ssdboot/cmdline.txt
root@rpi4-20201112:/home/seeder1# cat /tmp/ssdboot/cmdline.txt 
console=tty0 console=ttyS1,115200 root=PARTUUID=59097f66-f9fb-4a50-a491-8a71becaa2bd rw elevator=deadline fsck.repair=yes net.ifnames=0 rootwait
#console=tty0 console=ttyS1,115200 root=LABEL=RASPIROOT rw elevator=deadline fsck.repair=yes net.ifnames=0 rootwait


And success it is I am now booted from ssd.

root@buster-raspi:/home/seeder1# blkid
/dev/sda1: SEC_TYPE="msdos" UUID="3651-174E" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="9fad4e77-177d-4a3c-929a-3897e6bc1810"
/dev/sda2: UUID="4a349c2c-0df5-4fdb-a99f-906423554de9" TYPE="ext4" PARTUUID="59097f66-f9fb-4a50-a491-8a71becaa2bd"
The editing of the cmdline.txt to change to the / UUID for booting and the blkid after the new boot. It is simple procedure to do and works flawlessly every time I use it for my backups or copy install. If wanting to do the LABEL= method to boot from then.

Code:
root@rpi4-20201112:/home/seeder1# e2label /dev/sda2 RASPIROOT
root@rpi4-20201112:/home/seeder1# fatlabel /dev/sda1 RASPIFIRM
To label the partitions correctly as they were done with the sdcard.

Code:
root@bullseye-raspi:~# cat /etc/fstab 
# The root file system has fs_passno=1 as per fstab(5) for automatic fsck.
LABEL=RASPIROOT / ext4 rw 0 1
# All other file systems have fs_passno=2 as per fstab(5) for automatic fsck.
LABEL=RASPIFIRM /boot/firmware vfat rw 0 2

# Added for rtorrent files.
/dev/sdb1 /home/seeder1/rtorrent    ext4    defaults        0       2
root@bullseye-raspi:~# cat /boot/firmware/cmdline.txt 
console=tty0 console=ttyS1,115200 root=/dev/sda2 rw fsck.repair=yes net.ifnames=0  rootwait
The files as there are currently on my install I left the root=/dev/sda2 in the cmdline.txt as the disk always shows up as the first drive in the system. The LABEL= in the /etc/fstab stops me from having to edit for a new UUID on every backup of my SSD to its spare. Now I check it again you may need to adjust the firmware copying and setting in the /etc/fstab depending where it is mounted in your install on the sdcard. And use the below on the SSD before any copying or label commands used to erase and start with newly formatted partitions.

Code:
mkfs.vfat /dev/sda1
mkfs.ext4 /dev/sda2
Used as root or with sudo in front of the command if using that method. Once done all the steps shutdown the Pi and remove the sdcard and boot into the newly copied install on the SSD.

Last edited by HappyTux; 10-31-2021 at 04:47 PM.
 
Old 11-02-2021, 04:43 PM   #8
beltza73
LQ Newbie
 
Registered: Oct 2021
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by HappyTux View Post
Here is how to do it guaranteed. Boot with the sdcard in the Pi then the following commands use sudo in front of them if you have not enabled the root user. From my notes on installing buster on my SSD copied from the sdcard onto it. These will work with any version of OS except the Windows as I have never tried that build.

Code:
root@rpi4-20201112:/home/seeder1# mkdir /tmp/ssdboot
root@rpi4-20201112:/home/seeder1# mkdir /tmp/ssdroot
Those two make the directories for the copy process mount points.

Code:
root@rpi4-20201112:/home/seeder1# blkid   
/dev/mmcblk1p1: SEC_TYPE="msdos" LABEL_FATBOOT="RASPIFIRM" LABEL="RASPIFIRM" UUID="AC25-5007" TYPE="vfat" PARTUUID="8ed03b0d-01"
/dev/mmcblk1p2: LABEL="RASPIROOT" UUID="cce1d06d-e567-4b48-a624-e823b516507f" TYPE="ext4" PARTUUID="8ed03b0d-02"
/dev/sda2: UUID="4a349c2c-0df5-4fdb-a99f-906423554de9" TYPE="ext4" PARTUUID="59097f66-f9fb-4a50-a491-8a71becaa2bd"
/dev/mmcblk1: PTUUID="8ed03b0d" PTTYPE="dos"
/dev/sda1: SEC_TYPE="msdos" UUID="3651-174E" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="9fad4e77-177d-4a3c-929a-3897e6bc1810"
That command gets the needed UUIDs for the SSD to edit the /etc/fstab if you do not use the LABEL= method for it when booting from the SSD.

Code:
root@rpi4-20201112:/home/seeder1# mount /dev/sda1 /tmp/ssdboot 
root@rpi4-20201112:/home/seeder1# mount /dev/sda2 /tmp/ssdroot
root@rpi4-20201112:/home/seeder1# cp -av /boot/firmware/* /tmp/ssdboot/
'/boot/firmware/bcm2711-rpi-4-b.dtb' -> '/tmp/ssdboot/bcm2711-rpi-4-b.dtb'
'/boot/firmware/bcm2837-rpi-3-a-plus.dtb' -> '/tmp/ssdboot/bcm2837-rpi-3-a-plus.dtb'
'/boot/firmware/bcm2837-rpi-3-b-plus.dtb' -> '/tmp/ssdboot/bcm2837-rpi-3-b-plus.dtb'
'/boot/firmware/bcm2837-rpi-3-b.dtb' -> '/tmp/ssdboot/bcm2837-rpi-3-b.dtb'
'/boot/firmware/bcm2837-rpi-cm3-io3.dtb' -> '/tmp/ssdboot/bcm2837-rpi-cm3-io3.dtb'
snip...
root@rpi4-20201112:/home/seeder1# rsync -ahPHAXx --delete --exclude={/boot/firmware/*,/dev/*,/proc/*,/sys/*,/tmp/*,/run/*,/mnt/*,/media/*,/lost+found} / /tmp/ssdroot/
sending incremental file list
./
bin -> usr/bin
initrd.img -> boot/initrd.img-5.8.0-0.bpo.2-arm64
initrd.img.old -> boot/initrd.img-5.8.0-0.bpo.2-arm64
lib -> usr/lib
snip...
Those commands mount the SSD partitions to their copying mount points then do the copy of the files.


Code:
root@rpi4-20201112:/home/seeder1# nano /tmp/ssdroot/etc/fstab
root@rpi4-20201112:/home/seeder1# cat /tmp/ssdroot/etc/fstab
# The root file system has fs_passno=1 as per fstab(5) for automatic fsck.
#LABEL=RASPIROOT / ext4 rw 0 1
PARTUUID=59097f66-f9fb-4a50-a491-8a71becaa2bd / ext4 rw 0 1
# All other file systems have fs_passno=2 as per fstab(5) for automatic fsck.
#LABEL=RASPIFIRM /boot/firmware vfat rw 0 2
PARTUUID=9fad4e77-177d-4a3c-929a-3897e6bc1810 /boot/firmware vfat rw 0 2

# the /proc filesytem
proc /proc proc defaults 0 0
The /etc/fstab edited to boot with the UUID method.

Code:
root@rpi4-20201112:/home/seeder1# nano /tmp/ssdboot/cmdline.txt
root@rpi4-20201112:/home/seeder1# cat /tmp/ssdboot/cmdline.txt 
console=tty0 console=ttyS1,115200 root=PARTUUID=59097f66-f9fb-4a50-a491-8a71becaa2bd rw elevator=deadline fsck.repair=yes net.ifnames=0 rootwait
#console=tty0 console=ttyS1,115200 root=LABEL=RASPIROOT rw elevator=deadline fsck.repair=yes net.ifnames=0 rootwait


And success it is I am now booted from ssd.

root@buster-raspi:/home/seeder1# blkid
/dev/sda1: SEC_TYPE="msdos" UUID="3651-174E" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="9fad4e77-177d-4a3c-929a-3897e6bc1810"
/dev/sda2: UUID="4a349c2c-0df5-4fdb-a99f-906423554de9" TYPE="ext4" PARTUUID="59097f66-f9fb-4a50-a491-8a71becaa2bd"
The editing of the cmdline.txt to change to the / UUID for booting and the blkid after the new boot. It is simple procedure to do and works flawlessly every time I use it for my backups or copy install. If wanting to do the LABEL= method to boot from then.

Code:
root@rpi4-20201112:/home/seeder1# e2label /dev/sda2 RASPIROOT
root@rpi4-20201112:/home/seeder1# fatlabel /dev/sda1 RASPIFIRM
To label the partitions correctly as they were done with the sdcard.

Code:
root@bullseye-raspi:~# cat /etc/fstab 
# The root file system has fs_passno=1 as per fstab(5) for automatic fsck.
LABEL=RASPIROOT / ext4 rw 0 1
# All other file systems have fs_passno=2 as per fstab(5) for automatic fsck.
LABEL=RASPIFIRM /boot/firmware vfat rw 0 2

# Added for rtorrent files.
/dev/sdb1 /home/seeder1/rtorrent    ext4    defaults        0       2
root@bullseye-raspi:~# cat /boot/firmware/cmdline.txt 
console=tty0 console=ttyS1,115200 root=/dev/sda2 rw fsck.repair=yes net.ifnames=0  rootwait
The files as there are currently on my install I left the root=/dev/sda2 in the cmdline.txt as the disk always shows up as the first drive in the system. The LABEL= in the /etc/fstab stops me from having to edit for a new UUID on every backup of my SSD to its spare. Now I check it again you may need to adjust the firmware copying and setting in the /etc/fstab depending where it is mounted in your install on the sdcard. And use the below on the SSD before any copying or label commands used to erase and start with newly formatted partitions.

Code:
mkfs.vfat /dev/sda1
mkfs.ext4 /dev/sda2
Used as root or with sudo in front of the command if using that method. Once done all the steps shutdown the Pi and remove the sdcard and boot into the newly copied install on the SSD.
I reached this point:
pi@raspberrypi:~ $ sudo mkdir /tmp/ssdboot
pi@raspberrypi:~ $ sudo blkid
/dev/mmcblk0p1: LABEL_FATBOOT="RECOVERY" LABEL="RECOVERY" UUID="A33E-4900" TYPE="vfat" PARTUUID="55965abb-01"
/dev/mmcblk0p5: LABEL="SETTINGS" UUID="6158a049-809c-4b89-94cf-9cccd85b0e0a" TYPE="ext4" PARTUUID="55965abb-05"
/dev/mmcblk0p6: LABEL_FATBOOT="boot" LABEL="boot" UUID="0190-7BE3" TYPE="vfat" PARTUUID="55965abb-06"
/dev/mmcblk0p7: LABEL="root" UUID="981a515c-f7f6-477d-8380-0125de991be0" TYPE="ext4" PARTUUID="55965abb-07"
/dev/sda1: LABEL="GureSSD" UUID="68533988-ef38-4dbb-8a43-b71b878ffdbc" TYPE="ext4" PARTUUID="589fa70c-01"
/dev/sdb1: UUID="7333-09C1" TYPE="vfat"
/dev/mmcblk0: PTUUID="55965abb" PTTYPE="dos"

pi@raspberrypi:~ $ mount /dev/sda1 /tmp/ssdboot
mount: only root can do that
pi@raspberrypi:~ $
 
Old 11-02-2021, 04:57 PM   #9
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,751

Rep: Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929
Quote:
mount: only root can do that
Use sudo

sudo mount /dev/sda1 /tmp/ssdboot
 
Old 11-02-2021, 06:09 PM   #10
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally Posted by beltza73 View Post
I reached this point:
pi@raspberrypi:~ $ sudo mkdir /tmp/ssdboot
pi@raspberrypi:~ $ sudo blkid
/dev/mmcblk0p1: LABEL_FATBOOT="RECOVERY" LABEL="RECOVERY" UUID="A33E-4900" TYPE="vfat" PARTUUID="55965abb-01"
/dev/mmcblk0p5: LABEL="SETTINGS" UUID="6158a049-809c-4b89-94cf-9cccd85b0e0a" TYPE="ext4" PARTUUID="55965abb-05"
/dev/mmcblk0p6: LABEL_FATBOOT="boot" LABEL="boot" UUID="0190-7BE3" TYPE="vfat" PARTUUID="55965abb-06"
/dev/mmcblk0p7: LABEL="root" UUID="981a515c-f7f6-477d-8380-0125de991be0" TYPE="ext4" PARTUUID="55965abb-07"
/dev/sda1: LABEL="GureSSD" UUID="68533988-ef38-4dbb-8a43-b71b878ffdbc" TYPE="ext4" PARTUUID="589fa70c-01"
/dev/sdb1: UUID="7333-09C1" TYPE="vfat"
/dev/mmcblk0: PTUUID="55965abb" PTTYPE="dos"

pi@raspberrypi:~ $ mount /dev/sda1 /tmp/ssdboot
mount: only root can do that
pi@raspberrypi:~ $
As michaelk has pointed out you forgot the sudo to be doing it using root user permissions. It appears you have a second drive connected to the usb and a rather complicated setup on the sdcard. Can you give us the output of the following command so we can see the layout of how everything is mounted, it can be run with normal user permissions.

Code:
zeus@bullseye-raspi:~$ mount | grep /dev
udev on /dev type devtmpfs (rw,nosuid,relatime,size=3949232k,nr_inodes=987308,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
/dev/sda2 on / type ext4 (rw,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
/dev/sda1 on /boot/firmware type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro)
/dev/sdb1 on /home/seeder1/rtorrent type ext4 (rw,relatime)
What you want to do it try to copy the sdcard to the SSD with the same structure as on it so it will be able to boot properly.
 
Old 11-02-2021, 06:36 PM   #11
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,751

Rep: Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929
From the link the OP posted I assume they want to use the USB drive for data and not necessarily as a boot device although that isn't a bad idea.

Lets just take one step at a time.
 
Old 11-06-2021, 09:39 AM   #12
beltza73
LQ Newbie
 
Registered: Oct 2021
Posts: 6

Original Poster
Rep: Reputation: Disabled
Hello, and thanks again for your help

The USB is only for storage. I have ejected.

I only want to use SSD as storage. If you recommend me to copy the SD there, I accept your recommendation. The structure of the SD is the original one, I have not done any modification.
Here you have the output of the command:

pi@raspberrypi:~ $ mount | grep /dev
/dev/mmcblk0p7 on / type ext4 (rw,noatime)
devtmpfs on /dev type devtmpfs (rw,relatime,size=3879284k,nr_inodes=74939,mode=755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
mqueue on /dev/mqueue type mqueue (rw,relatime)
/dev/sda1 on /home/pi/niressd type ext4 (rw,nosuid,nodev,noexec,relatime,stripe=8191)
/dev/mmcblk0p6 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro)
 
Old 11-06-2021, 09:50 AM   #13
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,751

Rep: Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929
Quote:
/dev/sda1 on /home/pi/niressd type ext4 (rw,nosuid,nodev,noexec,relatime,stripe=8191)
sudo chown pi:pi /home/pi/niressd
 
Old 11-06-2021, 09:59 AM   #14
beltza73
LQ Newbie
 
Registered: Oct 2021
Posts: 6

Original Poster
Rep: Reputation: Disabled
Thanks! That was all! It worked!

Should I copy SD to SSD, and boot from there?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
change of owner and group owner of a file belongs to diff user ? somorg Linux - Newbie 3 06-14-2015 09:11 AM
change of owner and group owner of a file belongs to diff user ? somorg Linux - Security 2 06-13-2015 02:33 AM
change of owner and group owner of a file belongs to diff user ? somorg Linux - General 2 06-12-2015 10:40 AM
change file owner to another owner byran cheung Linux - Newbie 5 12-19-2014 03:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration