LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Laptop and Netbook (https://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/)
-   -   Contents of partition accessible without mounting. (https://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/contents-of-partition-accessible-without-mounting-4175643685/)

stf92 12-05-2018 08:22 AM

Contents of partition accessible without mounting.
 
Code:

root@darkstar~# blkid
/dev/mmcblk0p1: LABEL="ARCH" UUID="738add7f-692c-4b17-a25c-0028d618e22b" TYPE="ext2" PARTUUID="48727b69-01"
/dev/mmcblk0p2: LABEL="ALMACEN" UUID="330fd1ba-93b9-4e01-acd9-a799c26a039a" TYPE="ext2" PARTUUID="48727b69-02"
/dev/mmcblk0: PTUUID="48727b69" PTTYPE="dos"
root@darkstar~# mount|grep mmc
/dev/mmcblk0p1 on / type ext2 (rw,relatime,block_validity,barrier,user_xattr,acl)
root@darkstar~# ls -l /almacen
total 12K
drwxr-xr-x  4 bill bill 4.0K Dec  5 08:45 info
drwxr-xr-x  5 bill bill 4.0K Dec  5 08:45 Nonsoft
drwxr-xr-x 17 bill bill 4.0K Dec  5 08:45 soft
root@darkstar~#

What is listed under /almacen actually is the contents of /dev/mmcblk0p2. Now
Code:

root@darkstar~# mount /dev/mmcblk0p2 /juan
root@darkstar~#

And here, where info, Nonsoft, soft really are I have
Code:

root@darkstar~# ls -l /juan
total 16K
drwx------ 2 root root 16K Dec  4 23:29 lost+found

Any way to explain this weir behaviour?

michaelk 12-05-2018 08:43 AM

It is not the same.

/almacen is a directory on your /dev/mmcblk0p1 partition and /juan is the mount point of /dev/mmcblk0p2 which appears to be empty.

hydrurga 12-05-2018 09:37 AM

Can I suggest to the OP that you create separate threads for the two additional problems. It will give them more visibility and keep each thread focussed on a single issue.

stf92 12-05-2018 10:06 AM

But they are intimately related, as being the result of a single action. Anyway, here it goes.

stf92 12-05-2018 03:44 PM

Alright, it's all been a mistake of mine, I mean a stupid mistake. I have two machines. Lets call one the old one and the other the new one (the new one has 100 times more space in the hard disk than the old one and I bought it a couple of days ago). I wanted to install Tex Live but the space on disk taken by such a piece of software is really phenomenal. To be able to install I decided to enlarge the /dev/mmcblk0p1 partition to take the whole of /dev/mmcblk0p2, a really unnecesary thing as I could have told the installer to install in the latter. That is, to have /dev/mmcblk0p1 occupying the whole disk, of course first destroying /mmcblk0p2. But in the latter I had very valuable information, namely /almacen.

So I transfered /almacen (/dev/mmcblk0p2) to an SD card and proceeded to destroy /dev/mmcblk0p2 and enlarge /dev/mmcblk0p1 (parted). Then I changed my mind and thought I did not need a monster like Tex Live. After all I had tetex which comes in the Slackware disks. Now I had to restore things to its old state and proceeded to shrink /dev/mmcblk0p1 and create /dev/mmcblk0p2 and transfer the SD card to /dev/mmcblk0p2. Judging by the result what I really did was to transfer the card to /dev/mmcblk0p1 where there was a much smaller space than the /almacen tree. The partition was left fully occupied and since then I have been working with the root partition full (df showed 100% use). And the most weird things could be expected to happen, I think.

Actually things were more complex than described, for the old machine had problems with the SD card (blkid detects it only when I am lucky). I had to use the new machine to transfer the card to a pendrive and then transfer the pendrive to the old one, which still is the one I usually use.


All times are GMT -5. The time now is 12:02 PM.