Tiny Core Linux
Tiny Core Base => TCB Q&A Forum => Topic started by: Fven on April 25, 2020, 09:18:53 AM
-
Hello,
I have made a installation of TC11.1 (64 bits) on a uefi thin client. I used this tutorial (http://forum.tinycorelinux.net/index.php/topic,22848.msg143377.html). The partitions on the internal SSD drive are /mnt/mmcblk1p1 and /mnt/mmcblk1p2. sometimes it is /mnt/mmcbik0p1.
Is it possible to change it to /mnt/sdd1 and /mnt/sdd2?
I tried a soft link and modified fstab but unfortunately that didn't work.
-
You could use "search --no-floppy --fs-uuid --set=root <partition_uuid>" to make sure it was always /mnt/mmcbik0p1 for example.
Perhaps you could use a udev rule to set it to /mnt/sdd1?
-
Hi Juanito,
I think "mmcbik" is the name of the internal flash disk. When I boot from a USB drive, partition 1 (fat32, boot) becomes: /mnt/mmcbik1p1 and partition 2 (ext2) /mnt/mmcbik1p2. When I boot from the internal ssd it is /mnt/mmcbik0p1. With gparted I tried to change the name of the ssd but without success.
I read a lot about "udev rules" on the forum and on the internet. But honestly, I don't get it. I know udev should be in: /etc/udev/rules.d/ and a reference in: opt/.filetool.lst
I have not found an example of how to rename the disk to sda1 and sda2. Could point me in the right direction? Thanks.
-
I'm not an expert on this, but I think udev would be the only way to change the name.
Why do you want to change the name?
-
I use the SSD to store data. To access it with the terminal I always have to use the full device name (cd /mnt/mmcbik0p1/). I regularly make a typo here and sda1 is easier to read in the notes I make.
-
Can you make a symlink, i.e. sudo ln -s /mnt/mmcblk0p1 /mnt/sda1?
-
I also thought that would be the easiest way.
tc@box:~$ sudo ln -s /mmcnlk1p1 /mnt/sda1
tc@box:~$ sudo ln -s /mmcnlk1p2 /mnt/sda2
tc@box:/mnt$ ls
mmcblk1p1/ mmcblk1p2/ sda1 sda2
tc@box:/mnt$ cd sda1
sh: cd: can't cd to sda1: No such file or directory
tc@box:/mnt$ cd sda2
sh: cd: can't cd to sda2: No such file or directory
-
Hi Fven
I also thought that would be the easiest way.
tc@box:~$ sudo ln -s /mmcnlk1p1 /mnt/sda1
tc@box:~$ sudo ln -s /mmcnlk1p2 /mnt/sda2
Re-read the answer Juanito gave you. That should have been:
tc@box:~$ sudo ln -s /mnt/mmcblk1p1 /mnt/sda1
tc@box:~$ sudo ln -s /mnt/mmcblk1p2 /mnt/sda2
[EDIT]: Fixed typo, changed mmcnlk to mmcblk. Rich
-
That should be:
$ sudo ln -s /mnt/mmcblk1p1 /mnt/sda1
-
Hi Rich,
Sorry for the mistake. I had to retype everything.
tc@box:~$ sudo ln -s /mnt/mmcblk1p1 /mnt/sda1
tc@box:~$ sudo ln -s /mnt/mmcblk1p2 /mnt/sda2
tc@box:~$ cd /mnt
tc@box:/mnt$ ls
mmcblk1p1/ mmcblk1p2/ sda1/ sda2/
tc@box:/mnt$ cd sda1
tc@box:/mnt/sda1$ ls
mmcblk1p1
tc@box:/mnt/sda1$ cd ../sda2
tc@box:/mnt/sda2$ ls
mmcblk1p2
-
Hi Fven
----- Snip -----
tc@box:~$ cd /mnt
tc@box:/mnt$ ls
mmcblk1p1/ mmcblk1p2/ sda1/ sda2/
tc@box:/mnt$ cd sda1
tc@box:/mnt/sda1$ ls
mmcblk1p1
----- Snip -----
Something is wrong there.
The sda1 and sda2 links in the ls command should not have a trailing /
The result of the cd command should look like this:
tc@box:/mnt$ cd sda1
tc@box:/mnt/mmcblk1p1$
Here's what it looks like if I create a link:
tc@E310:~$ sudo ln -s /mnt/sda1/ /mnt/xyzzy
tc@E310:~$ cd /mnt/
tc@E310:/mnt$ ls
sda1/ sda2/ sda3/ sda6/ sr0/ sr1/ test/ xyzzy
tc@E310:/mnt$ cd xyzzy/
tc@E310:/mnt/sda1$ ls
boot/ home/ lost+found/ opt/ tce/ tce64/ tce64TC11b1/ tce64TC11b1.bak/
tc@E310:/mnt/sda1$
Did you have /mnt/sda1 and /mnt/sda2 directories already present when you executed the link commands?
-
Hi Juanito, Rich,
I have found the solution. There should be a / behind mmcblk1p1
tc@box:/mnt$ sudo ln -s /mnt/mmcblk1p1/ /mnt/sda1
tc@box:/mnt$ sudo ln -s /mnt/mmcblk1p2/ /mnt/sda2
Thanks
-
Hi Fven
... There should be a / behind mmcblk1p1 ...
I don't think that was the cause of your problem. I suspect it was caused by having /mnt/sda1 and /mnt/sda2 directories already
present when you executed the link commands. I was able to duplicate your problem by creating a link to an existing directory.
-
You're right. My mistake. I probably didn't see sda1 and sda2 and rebooted Tiny Core just before I made the last changes.
thanks again.
-
hi Fven,
I notice you type "mmcbik" instead of "mmcblk". Is mmcbik valid?
I find it easy to remember this way:
"mmc"
"blk0" or "blk1" for block 0 or block 1
"p0" or "p1" for partition 1 or 2
To me "sda" or "sdb" refers to a USB drive.
I also define shortcuts, m1, c1, u1 etc in .ashrc to make life easier.
# ~/.ashrc: Executed by SHells.
#
. /etc/init.d/tc-functions
if [ -n "$DISPLAY" ]
then
`which editor >/dev/null` && EDITOR=editor || EDITOR=vi
else
EDITOR=vi
fi
export EDITOR
PS1='\[\033[01;32m\]\u@\h:\[\033[00m\]\[\033[01;34m\]\w\$\[\033[00m\] '
export PS1
TCEDEV="/dev/$(readlink /etc/sysconfig/tcedir | cut -d '/' -f3)"
TCEMNT="/mnt/$(readlink /etc/sysconfig/tcedir | cut -d '/' -f3)"
BOOTDEV=${TCEDEV%%?}1
BOOTMNT=${TCEMNT%%?}1
# Alias definitions.
#
alias df='df -h'
alias du='du -h'
alias ls='ls -p'
alias ll='ls -l'
alias la='ls -la'
# Avoid errors... use -f to skip confirmation.
alias cp='cp -i'
alias mv='mv -i'
alias rm='rm -i'
# Change directory to
alias ce="cd $TCEMNT/tce"
alias ceo="cd $TCEMNT/tce/optional"
alias c1="cd $BOOTMNT"
alias c2="cd $TCEMNT"
# Mount partition
alias m1="mount $BOOTMNT"
alias m2="mount $TCEMNT"
# Unmount partition
alias u1="umount $BOOTMNT"
alias u2="umount $TCEMNT"
# Edit config files
alias vicfg="vi $BOOTMNT/config.txt"
alias vicmd="vi $BOOTMNT/cmdline.txt"
It looks like Paul has made some enhancements to our .ashrc over the years. Thanks Paul!
regards
Greg
-
Hi Greg Erskine
... I notice you type "mmcbik" instead of "mmcblk". Is mmcbik valid? ...
Probably not, but the i key is northwest of the l key and easy to trip over. ;D
To me "sda" or "sdb" refers to a USB drive.
On my machine sd refers to the 2 hard drives. Thumb drives and SD memory cards also get assigned an sd label.
-
Hi Greg Erskine,
It is mmcblk. Until my message of "April 29, 2020, 04:48:32 AM" I did not have a browser installed on my thin client. I have to retype everything and it is difficult to read the text from the screen.
I use SDA because I use Tiny Core on both the internal SSD drive and a USB drive. So I can use the same notes.