Raspbian mounts the root filesystem using a partition UUID which likely changed when you resized the partition. If so, this would explain why the system didn't boot afterwards.
Yes, the /home/pi/Desktop and /home/pi/Documents resides on the boot HDD. Actually its made to be there by default during installation. You can check it out using the file manager, and start moving your files there.
another Yes. Actually I've been doing the same thing on my torrent box. It has 2 NTFS formatted HDDs shared to the network via samba. Windows, Mac, Android, and other Linux OS can see and access the 2 HDDs.GAP wrote: If I connect a 2nd HDD to my Pi formatted as NTFS, which will show as a mounted HDD in media/Pi, I can then view/access it from my XP machine using Samba. I have now overcome the limits of using an SD card read/write wise - Yes/No?
Speaking from my experience with this RPi3B+ (and the RPi3B before this), its a Yes from me. (others may have different view on the matter)GAP wrote: I believe that if I pursue this scenario I should end up with a fully functional Pi desktop machine am I correct - Yes/No?
Sometimes, especially with computers, it's good to take a break. Sometimes the problem seems much easier a year later: the technology improves as does ones understanding.
It is working like this;ejolson wrote: ↑Fri Sep 14, 2018 4:16 amSometimes, especially with computers, it's good to take a break. Sometimes the problem seems much easier a year later: the technology improves as does ones understanding.
Having said this, I think it is possible to edit cmdline.txt before first boot and remove the option that causes Raspbian to resize the partition to take over the entire disk. At this point, however, it is probably best to work on something else.
Code: Select all
[email protected]:~ $ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 232.9G 0 disk
├─sda1 8:1 0 43.2M 0 part /boot
├─sda2 8:2 0 97.3G 0 part /
└─sda3 8:3 0 135.5G 0 part /media/pi/mypartition
Code: Select all
[email protected]:~ $ blkid
/dev/sda1: LABEL="boot" UUID="6228-7918" TYPE="vfat" PARTUUID="51301da5-01"
/dev/sda2: LABEL="rootfs" UUID="6bfc8851-cf63-4362-abf1-045dda421aad" TYPE="ext4" PARTUUID="51301da5-02"
/dev/sda3: LABEL="mypartition" UUID="641102156BE01A4D" TYPE="ntfs" PTTYPE="dos" PARTUUID="51301da5-03"
Briefly and untested, as I do not have a Stretch machine installed ATM:
You are right NTFS does not work for home directories. The simplest solution is to leave home where it is and create a symbolic link to make accessing the NTFS partition easier. For example,
That procedure is what I have been trying with no luck.LTolledo wrote: ↑Sun Sep 16, 2018 9:11 amWell it is weekend so I tried something that I posted that I will do, "HDD split" for the boot HDD drive.
If raspbian is flashed to USB device (from here on will use "HDD" as USB device) using Etcher, even if the HDD is partitioned to 2 (or 2+n) parts, Etcher will delete all partitions and flash raspbian into 1 big single partition. The HDD has a capacity of 250GB
Proceeded with installing raspbian on that one big partition. The RPi used in this test installation is an RPi3B
Once the initial raspbian installation was finished, proceeded to installing my favorite packages/apps.
So I still have one big partition on the 250GB HDD. But I want to have the root partition to be smaller (say about 100GB ).
Shutdown RPi3B, unplugged the HDD and plugged it into another RPi (RPi3B+ with a 32GB USB flashdrive boot).
***This can be substituted by using a microSD card with an installed raspbian desktop on the RPi3B***
Once the HDD was mounted, used gparted to unmount and shrink the root partition on the HDD to just about 97GB.
The remaining space in the HDD was left as un-allocated space (not formatted)
After the shrinking process was completed, exited gparted, unplug the HDD from RPi3B+ and plugged it again to RPi3B.
Powered up the RPi3B... it booted! Yay!
So my RPi3B booted on a shrunk root partition of the HDD. I was expecting it not to, but good thing it did.
Next I opened gparted on the RPI3B and formatted the remaining un-allocated space in the HDD to NTFS format.
After the format process was completed, exited gparted and issued reboot command.
Aaaaaand it rebooted without any problems! Success! "HDD split" is possible!
below are some of command outputs after the process.Code: Select all
[email protected]:~ $ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 232.9G 0 disk ├─sda1 8:1 0 43.2M 0 part /boot ├─sda2 8:2 0 97.3G 0 part / └─sda3 8:3 0 135.5G 0 part /media/pi/mypartition
Next is how to direct raspbian to change the path of home directory from /home to /media/pi/mypartition/homeCode: Select all
[email protected]:~ $ blkid /dev/sda1: LABEL="boot" UUID="6228-7918" TYPE="vfat" PARTUUID="51301da5-01" /dev/sda2: LABEL="rootfs" UUID="6bfc8851-cf63-4362-abf1-045dda421aad" TYPE="ext4" PARTUUID="51301da5-02" /dev/sda3: LABEL="mypartition" UUID="641102156BE01A4D" TYPE="ntfs" PTTYPE="dos" PARTUUID="51301da5-03"
This one I need help with
I think this may be the cause of the problem.GAP wrote: .... install the SD card that I copied onto the HDD and started up Pi.
Code: Select all
dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=PARTUUID=51301da5-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
Code: Select all
proc /proc proc defaults 0 0
PARTUUID=51301da5-01 /boot vfat defaults 0 2
PARTUUID=51301da5-02 / ext4 defaults,noatime 0 1
# a swapfile is not a swap partition, no line here
# use dphys-swapfile swap[on|off] for that
Code: Select all
sda 8:0 0 232.9G 0 disk
├─sda1 8:1 0 43.2M 0 part /boot
├─sda2 8:2 0 97.3G 0 part /
└─sda3 8:3 0 135.5G 0 part /media/pi/mypartition
Code: Select all
~ $ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 96G 3.6G 89G 4% /
devtmpfs 460M 0 460M 0% /dev
tmpfs 464M 0 464M 0% /dev/shm
tmpfs 464M 13M 452M 3% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 464M 0 464M 0% /sys/fs/cgroup
/dev/sda1 43M 22M 21M 52% /boot
tmpfs 93M 0 93M 0% /run/user/1000
/dev/sda3 136G 69M 136G 1% /media/pi/mypartition
So you were able to split/shrink the USB HDD's /root partition in gparted?
Modifying cmdline.txt before the first boot to prevent Raspbian from taking over the entire disk is what I suggested earlier.
Ernst wrote: ↑Thu Sep 20, 2018 10:59 amI also have a headache trying to understand the problems in this thread and for that reason I have not yet posted.
This thread has drifted so much as I have been thinking about the method of solving this that I am not surprised anybody is confused, perhaps I should start again, its just I really don't know which questions to ask.
There is a simple way to reach at least one of your objectives: to have an ntfs partition that can be used under Windows XP as a separate external drive and can be used to boot Raspbian on a Pi with access to the ntfs partition. This has always been the objective but the thread drift is mostly caused by me as I changed the objective by grasping at straws see above.
Until now I have seen that you have been trying to reduce the root partition, but it might be simpler to increase the size of a partition instead (if needed).
First of all may I just say To do any downloadingI will use my Win 10 machine XP is not allowed to go anywhere near the internet.
First step is to install the Win32DiskImager on your PC: https://sourceforge.net/projects/win32diskimager/, for Windows XP you may need to download version 0.9 from the files archive.
Then download the unzip utility from http://infozip.sourceforge.net/ and the latest Raspbian release from https://www.raspberrypi.org/downloads/raspbian/, use unzip to extract the image file to your hard disk. Is this the external HDD or the one on my Win 10 machine?
Now use Win32DiskImager to write the Raspbian image to adequate size (32/64G) micro SD card, use this card to boot the Pi, to customize the installation and to get the latest updates with apt-get.
Once completed use Win32DiskImager on the PC to create an image of the SD card in a file on your hard disk, be aware that you will need the same amount space as the size of the micro SD card.
Then use Win32DiskImager to write the image to your hard disk (the external HDD?), use the Windows Disk Manager to create the NTFS partition, and next boot from this hard disk (the external HDD?).
Once booted you have to unmount the ntfs partition and to update the fstab to mount the partition where you need it. I will need more information on where to look for/ how to do this please.
The above is the space consuming method, the alternative is to use Win32DiskImager to write the Raspbian image directly to the hard disk. (the external HDD?).
But then you should edit the file cmdline.txt so that the partition is not extended on the first boot by removing "init=/usr/lib/raspi-config/init_resize.sh".
Would I edit the cndline.txt when it is in my Win 10 machine, if so how do I do that? or do I I just used sudo nano cmdline.txt in terminal and got a blank page
Next you could boot from an micro SD card to increase the root partition on the HDD, and then create an ntfs partition on your PC. Sorry I do not understand this.
Sorry about all the questions but I am totally new at this but I am gradually learning bits and pieces.
It is difficult to write my answers in the quotes, for this reason I will copy the relevant sections below:GAP wrote: ↑Fri Sep 21, 2018 7:46 am@ L Tolledo, I have just tried the gparted shrink partition method using a freshly flashed SD card and it did not work, just got heaps of failed messages and Pi just locked up. It looked as though the boot part worked but roofs just did not.
Ernst wrote: ↑Thu Sep 20, 2018 10:59 amI also have a headache trying to understand the problems in this thread and for that reason I have not yet posted.
This thread has drifted so much as I have been thinking about the method of solving this that I am not surprised anybody is confused, perhaps I should start again, its just I really don't know which questions to ask.
There is a simple way to reach at least one of your objectives: to have an ntfs partition that can be used under Windows XP as a separate external drive and can be used to boot Raspbian on a Pi with access to the ntfs partition. This has always been the objective but the thread drift is mostly caused by me as I changed the objective by grasping at straws see above.
Until now I have seen that you have been trying to reduce the root partition, but it might be simpler to increase the size of a partition instead (if needed).
First of all may I just say To do any downloadingI will use my Win 10 machine XP is not allowed to go anywhere near the internet.
First step is to install the Win32DiskImager on your PC: https://sourceforge.net/projects/win32diskimager/, for Windows XP you may need to download version 0.9 from the files archive.
Then download the unzip utility from http://infozip.sourceforge.net/ and the latest Raspbian release from https://www.raspberrypi.org/downloads/raspbian/, use unzip to extract the image file to your hard disk. Is this the external HDD or the one on my Win 10 machine?
Now use Win32DiskImager to write the Raspbian image to adequate size (32/64G) micro SD card, use this card to boot the Pi, to customize the installation and to get the latest updates with apt-get.
Once completed use Win32DiskImager on the PC to create an image of the SD card in a file on your hard disk, be aware that you will need the same amount space as the size of the micro SD card.
Then use Win32DiskImager to write the image to your hard disk (the external HDD?), use the Windows Disk Manager to create the NTFS partition, and next boot from this hard disk (the external HDD?).
Once booted you have to unmount the ntfs partition and to update the fstab to mount the partition where you need it. I will need more information on where to look for/ how to do this please.
The above is the space consuming method, the alternative is to use Win32DiskImager to write the Raspbian image directly to the hard disk. (the external HDD?).
But then you should edit the file cmdline.txt so that the partition is not extended on the first boot by removing "init=/usr/lib/raspi-config/init_resize.sh".
Would I edit the cndline.txt when it is in my Win 10 machine, if so how do I do that? or do I I just used sudo nano cmdline.txt in terminal and got a blank page
Next you could boot from an micro SD card to increase the root partition on the HDD, and then create an ntfs partition on your PC. Sorry I do not understand this.
Sorry about all the questions but I am totally new at this but I am gradually learning bits and pieces.
Code: Select all
[email protected]:~ $ sudo blkid | grep sda
/dev/sda1: LABEL="boot" UUID="6228-7918" TYPE="vfat" PARTUUID="fd42fb14-01"
/dev/sda2: LABEL="rootfs" UUID="6bfc8851-cf63-4362-abf1-045dda421aad" TYPE="ext4" PARTUUID="fd42fb14-02"
/dev/sda3: LABEL="New Volume" UUID="AC4064D24064A534" TYPE="ntfs" PARTUUID="fd42fb14-03"
Code: Select all
proc /proc proc defaults 0 0
PARTUUID=fd42fb14-01 /boot vfat defaults 0 2
PARTUUID=fd42fb14-02 / ext4 defaults,noatime 0 1
PARTUUID=fd42fb14-03 /ntfs ntfs nofail,defaults 0 0
# a swapfile is not a swap partition, no line here
# use dphys-swapfile swap[on|off] for that
Code: Select all
dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=PARTUUID=bd98648d-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet init=/usr/lib/raspi-config/init_resize.sh splash plymouth.ignore-serial-consoles
Code: Select all
dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=PARTUUID=bd98648d-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles
Code: Select all
[email protected]:~ $ sudo blkid
/dev/mmcblk0p1: LABEL="boot" UUID="3725-1C05" TYPE="vfat" PARTUUID="9117538d-01"
/dev/mmcblk0p2: LABEL="rootfs" UUID="fd695ef5-f047-44bd-b159-2a78c53af20a" TYPE="ext4" PARTUUID="9117538d-02"
/dev/mmcblk0: PTUUID="9117538d" PTTYPE="dos"
/dev/sda1: LABEL="boot" UUID="6228-7918" TYPE="vfat" PARTUUID="bd98648d-01"
/dev/sda2: LABEL="rootfs" UUID="6bfc8851-cf63-4362-abf1-045dda421aad" TYPE="ext4" PARTUUID="bd98648d-02"
Code: Select all
[email protected]:~ $ sudo fdisk /dev/sda
Welcome to fdisk (util-linux 2.29.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): p
Disk /dev/sda: 931.5 GiB, 1000170586112 bytes, 1953458176 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xbd98648d
Device Boot Start End Sectors Size Id Type
/dev/sda1 8192 96663 88472 43.2M c W95 FAT32 (LBA)
/dev/sda2 98304 9420799 9322496 4.5G 83 Linux
Command (m for help): d
Partition number (1,2, default 2): 2
Partition 2 has been deleted.
Command (m for help): n
Partition type
p primary (1 primary, 0 extended, 3 free)
e extended (container for logical partitions)
Select (default p): p
Partition number (2-4, default 2): 2
First sector (96664-1953458175, default 98304):
Last sector, +sectors or +size{K,M,G,T,P} (98304-1953458175, default 1953458175): +56G
Created a new partition 2 of type 'Linux' and of size 56 GiB.
Partition #2 contains a ext4 signature.
Do you want to remove the signature? [Y]es/[N]o: n
Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
Code: Select all
[email protected]:~ $ sudo fdisk -l /dev/sda
Disk /dev/sda: 931.5 GiB, 1000170586112 bytes, 1953458176 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xbd98648d
Device Boot Start End Sectors Size Id Type
/dev/sda1 8192 96663 88472 43.2M c W95 FAT32 (LBA)
/dev/sda2 98304 117538815 117440512 56G 83 Linux
Code: Select all
[email protected]:~ $ sudo e2fsck -f /dev/sda2
e2fsck 1.43.4 (31-Jan-2017)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
rootfs: 127794/291456 files (0.1% non-contiguous), 1043446/1165312 blocks
[email protected]spberrypi:~ $ sudo resize2fs /dev/sda2
resize2fs 1.43.4 (31-Jan-2017)
Resizing the filesystem on /dev/sda2 to 14680064 (4k) blocks.
The filesystem on /dev/sda2 is now 14680064 (4k) blocks long.
Code: Select all
C:\> diskpart
Microsoft DiskPart version 6.1.7601
Copyright (C) 1999-2008 Microsoft Corporation.
On computer: FTH05W
DISKPART> list disk
Disk ### Status Size Free Dyn Gpt
-------- ------------- ------- ------- --- ---
Disk 0 Online 476 GB 1024 KB
Disk 1 Online 4657 GB 0 B *
Disk 2 Online 1397 GB 0 B
Disk 3 Online 2794 GB 0 B *
Disk 4 No Media 0 B 0 B
Disk 5 No Media 0 B 0 B
Disk 6 No Media 0 B 0 B
Disk 7 No Media 0 B 0 B
Disk 8 No Media 0 B 0 B
Disk 9 No Media 0 B 0 B
Disk 10 No Media 0 B 0 B
Disk 11 No Media 0 B 0 B
Disk 12 Online 931 GB 875 GB
DISKPART> select disk 12
Disk 12 is now the selected disk.
DISKPART> list partition
Partition ### Type Size Offset
------------- ---------------- ------- -------
Partition 1 Primary 43 MB 4096 KB
Partition 2 Primary 56 GB 48 MB
DISKPART> create partition primary
DiskPart succeeded in creating the specified partition.
DISKPART> select partition 3
Partition 3 is now the selected partition.
DISKPART> format fs=ntfs quick
100 percent completed
DiskPart successfully formatted the volume.
DISKPART> assign
DiskPart successfully assigned the drive letter or mount point.
DISKPART> active
DiskPart marked the current partition as active.
DISKPART> exit
Code: Select all
sudo apt-get update
sudo apt-get install ntfs-3g
Thanks for the write-up.
imho you can be very right that the limit is 2TB because of GPT.ejolson wrote: ↑Fri Sep 21, 2018 4:28 pmThanks for the write-up.
Am I right in supposing this method will work only for drives up to 2TB in size? My understanding is that fdisk doesn't handle larger disks and that Windows may do something strange when partitioning such a disk. I think a GPT type of partition table is required for larger disks, but the Pi won't recognize a boot partition in a GPT. Note that it might be possible to use a shadow partition table so the Pi still boots. I've not seen any discussion of this but maybe the person making the original post is using a 1TB drive anyway.