raspnoobfan
Posts: 9
Joined: Sat Nov 03, 2018 5:09 am

NTFS file partition?

Sun Jan 06, 2019 2:52 am

Is it possible to create a NTFS file partition on the micro sd crad used to boot raspian? I need to be able to transfer files over 4 GB and wanted a partition that you don't need to boot from but can still access on the same sd card.

User avatar
thagrol
Posts: 1681
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: NTFS file partition?

Sun Jan 06, 2019 12:11 pm

Yes but it would be simpler to use a USB stick formatted in NTFS or tranfer files over a network. ext4 supports large files, and the filesystem is largely irrelevant when transfering file over a network. You only need ntfs if directly connecting the SD card to a windows box to transfer files.

If you want to do it, the process is something like this:
  • Gather requirements:
    • Second SD card with raspbian or other computer running linux
    • USB card reader
  • Install ntfs-3g on both SD cards
  • Install gparted on the second card
  • Boot from second SD card
  • Connect original SD card via card reader
  • Run gparted
  • Reduce the size of the second partition
  • Create a new ntfs partition in the free space you have created
  • Apply changes
  • Boot from modified SD card
  • Create a mount point
  • Add a suitable entry to /etc/fstab
  • Reboot or manually mount the ntfs partition
This space unintentionally left blank.

raspnoobfan
Posts: 9
Joined: Sat Nov 03, 2018 5:09 am

Re: NTFS file partition?

Thu Jan 10, 2019 5:55 am

I wonder if having an NTFS partition on the boot sd card makes the system unsafe or more vulnerable to viruses?

User avatar
Imperf3kt
Posts: 2527
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: NTFS file partition?

Thu Jan 10, 2019 8:00 am

raspnoobfan wrote:
Thu Jan 10, 2019 5:55 am
I wonder if having an NTFS partition on the boot sd card makes the system unsafe or more vulnerable to viruses?
Since Microsoft Windows is not installed on that partition, no it doesn't.
It's no less safe than plugging a regular hard drive, thumb drive or optical media into a computer to transfer files.
55:55:44:44:4C
52:4C:52:42:41

User avatar
thagrol
Posts: 1681
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: NTFS file partition?

Thu Jan 10, 2019 11:35 am

Imperf3kt wrote:
Thu Jan 10, 2019 8:00 am
raspnoobfan wrote:
Thu Jan 10, 2019 5:55 am
I wonder if having an NTFS partition on the boot sd card makes the system unsafe or more vulnerable to viruses?
Since Microsoft Windows is not installed on that partition, no it doesn't.
Wrong.
It's no less safe than plugging a regular hard drive, thumb drive or optical media into a computer to transfer files.
It's not quite that simple. A Pi is immune to windows viruses because it's A. not running windows, and B. uses a different processor architecture.

If a windows machine has access to the partition, that machine has the same level of risk as it does with its own drives. As do the files on the partition.

Whether windows is installed on the Pi's partition is completely irrelevant.
This space unintentionally left blank.

User avatar
Imperf3kt
Posts: 2527
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: NTFS file partition?

Thu Jan 10, 2019 1:55 pm

thagrol wrote:
Thu Jan 10, 2019 11:35 am
Imperf3kt wrote:
Thu Jan 10, 2019 8:00 am
raspnoobfan wrote:
Thu Jan 10, 2019 5:55 am
I wonder if having an NTFS partition on the boot sd card makes the system unsafe or more vulnerable to viruses?
Since Microsoft Windows is not installed on that partition, no it doesn't.
Wrong.
It's no less safe than plugging a regular hard drive, thumb drive or optical media into a computer to transfer files.
It's not quite that simple. A Pi is immune to windows viruses because it's A. not running windows, and B. uses a different processor architecture.

If a windows machine has access to the partition, that machine has the same level of risk as it does with its own drives. As do the files on the partition.

Whether windows is installed on the Pi's partition is completely irrelevant.

The partition is on the microSD card in the Pi. A windows computer has no access to it.
And just having a partition doesn't make it more susceptible to viruses. That's like saying I'm more susceptible to car crashes because I own a car.
55:55:44:44:4C
52:4C:52:42:41

pws
Posts: 89
Joined: Mon Apr 11, 2016 4:16 pm

Re: NTFS file partition?

Thu Jan 10, 2019 2:04 pm

Imperf3kt wrote:
Thu Jan 10, 2019 1:55 pm
That's like saying I'm more susceptible to car crashes because I own a car.
But that is, in fact, true!!!

DirkS
Posts: 9871
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: NTFS file partition?

Thu Jan 10, 2019 2:51 pm

Imperf3kt wrote:
Thu Jan 10, 2019 1:55 pm
The partition is on the microSD card in the Pi. A windows computer has no access to it.
Why would OP want an NTFS partition if there will be no direct access from a Windows computer?

User avatar
rpdom
Posts: 14697
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: NTFS file partition?

Thu Jan 10, 2019 3:18 pm

I think the point was that the OP wanted to be able to shutdown the Pi, remove the SD card and put it in a Windows PC.

That might work with Windows 10, I'm not sure, I don't have any Windows machines to test with. With earlier versions it wouldn't work because they only recognise the first partition on an SD card.

Hmm... maybe it could work if partition 1 was NTFS, partition 2 VFAT (for /boot) and partition 3 ext4 (Linux root), as I seem to remember something about the Pi being able to boot from the first FAT partition it finds on the card. I could be wrong.

User avatar
thagrol
Posts: 1681
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: NTFS file partition?

Thu Jan 10, 2019 5:08 pm

rpdom wrote:
Thu Jan 10, 2019 3:18 pm
I think the point was that the OP wanted to be able to shutdown the Pi, remove the SD card and put it in a Windows PC.
Indeed, that's my interpretation of the OP's requirement too. There's no point in using an NTFS partition otherwise (well, not unless you're using the mass storage USB gadget functions, and that opens a whole new can of worms)
That might work with Windows 10, I'm not sure, I don't have any Windows machines to test with. With earlier versions it wouldn't work because they only recognise the first partition on an SD card.
Only if your windows 10 install is upto date. Before, I think, autumn (fall) 2017 it still only mounted the first partition.
Hmm... maybe it could work if partition 1 was NTFS, partition 2 VFAT (for /boot) and partition 3 ext4 (Linux root), as I seem to remember something about the Pi being able to boot from the first FAT partition it finds on the card. I could be wrong.
Nope. First partition must be FAT or it won't boot. You could use a bigger FAT partition (non-trivial due to limitations in Linux's partitioning software) but you'd still be stuch with the 4GB file size limit.
This space unintentionally left blank.

User avatar
thagrol
Posts: 1681
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: NTFS file partition?

Thu Jan 10, 2019 5:19 pm

Imperf3kt wrote:
Thu Jan 10, 2019 1:55 pm
The partition is on the microSD card in the Pi. A windows computer has no access to it.
That's an invalid assumption. Have you not heard of samba? nfs? sshfs?, http?, ftp?, etc? Or just unpluging the SD card and pluging it into a windows box?

If windows can read a file system it can be infected by a (windows) virus present on it. It doesn't matter if that filesystem is local or on a server somewhere. For remote file systems it doesn't matter what the filesystem is, the client doesn't care and doesn't know (unless using something like iSCSI or ATAoE).

If windows can write to a filesystem, a (windows) virus can infect it. Again it makes no difference whether the filesystem is local or remote.

Nor does it matter in either case what OS the server is running.

If windows couldn't infect files on network storage, there'd be no need for linux software that detects and removes windows viruses. Hint: such software does indeed exist.
This space unintentionally left blank.

plugwash
Forum Moderator
Forum Moderator
Posts: 3431
Joined: Wed Dec 28, 2011 11:45 pm

Re: NTFS file partition?

Thu Jan 10, 2019 7:39 pm

raspnoobfan wrote:
Sun Jan 06, 2019 2:52 am
Is it possible to create a NTFS file partition on the micro sd crad used to boot raspian? I need to be able to transfer files over 4 GB and wanted a partition that you don't need to boot from but can still access on the same sd card.
AIUI you can create it but it will be useless, windows will only access the first partition on a SD card and the first partition on the SD card needs to be the fat32 boot partition and.

hvdkooij
Posts: 3
Joined: Fri Jan 04, 2019 4:04 pm

Re: NTFS file partition?

Thu Jan 10, 2019 8:09 pm

thagrol wrote:
Thu Jan 10, 2019 5:19 pm
Imperf3kt wrote:
Thu Jan 10, 2019 1:55 pm
The partition is on the microSD card in the Pi. A windows computer has no access to it.
That's an invalid assumption. Have you not heard of samba? nfs? sshfs?, http?, ftp?, etc? Or just unpluging the SD card and pluging it into a windows box?

If windows can read a file system it can be infected by a (windows) virus present on it. It doesn't matter if that filesystem is local or on a server somewhere. For remote file systems it doesn't matter what the filesystem is, the client doesn't care and doesn't know (unless using something like iSCSI or ATAoE).

If windows can write to a filesystem, a (windows) virus can infect it. Again it makes no difference whether the filesystem is local or remote.

Nor does it matter in either case what OS the server is running.

If windows couldn't infect files on network storage, there'd be no need for linux software that detects and removes windows viruses. Hint: such software does indeed exist.
A virus does not infect a filesystem. It may however ruin files on it. Or put itself into files on the filesystem and hope to hop along. ......
But that is besides the scope of the question at hand anyway.

DirkS
Posts: 9871
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: NTFS file partition?

Thu Jan 10, 2019 9:40 pm

plugwash wrote:
Thu Jan 10, 2019 7:39 pm
raspnoobfan wrote:
Sun Jan 06, 2019 2:52 am
Is it possible to create a NTFS file partition on the micro sd crad used to boot raspian? I need to be able to transfer files over 4 GB and wanted a partition that you don't need to boot from but can still access on the same sd card.
AIUI you can create it but it will be useless, windows will only access the first partition on a SD card and the first partition on the SD card needs to be the fat32 boot partition and.
IIRC that changed in Win10 not too long ago.
Have not tried it myself though

User avatar
thagrol
Posts: 1681
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: NTFS file partition?

Thu Jan 10, 2019 9:55 pm

hvdkooij wrote:
Thu Jan 10, 2019 8:09 pm

A virus does not infect a filesystem. It may however ruin files on it. Or put itself into files on the filesystem and hope to hop along. ......
But that is besides the scope of the question at hand anyway.
Yes, I'm well aware that most viruses attack files, I could have explained things a little more pedantically. That said, if memory serves there have been viruses that attack filesystems, the MBR, and system BIOS.
This space unintentionally left blank.

User avatar
thagrol
Posts: 1681
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: NTFS file partition?

Thu Jan 10, 2019 10:03 pm

DirkS wrote:
Thu Jan 10, 2019 9:40 pm
plugwash wrote:
Thu Jan 10, 2019 7:39 pm
raspnoobfan wrote:
Sun Jan 06, 2019 2:52 am
Is it possible to create a NTFS file partition on the micro sd crad used to boot raspian? I need to be able to transfer files over 4 GB and wanted a partition that you don't need to boot from but can still access on the same sd card.
AIUI you can create it but it will be useless, windows will only access the first partition on a SD card and the first partition on the SD card needs to be the fat32 boot partition and.
IIRC that changed in Win10 not too long ago.
Have not tried it myself though
It did (around the end of 17/start of 18). It does. It's why you get popups about unformatted discs when connecting a raspbian SD card to a windows 10 box. At a guess, someone didn't read the entire thread before posting.
This space unintentionally left blank.

User avatar
DougieLawson
Posts: 35520
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: NTFS file partition?

Fri Jan 11, 2019 10:40 pm

plugwash wrote:
Thu Jan 10, 2019 7:39 pm
raspnoobfan wrote:
Sun Jan 06, 2019 2:52 am
Is it possible to create a NTFS file partition on the micro sd crad used to boot raspian? I need to be able to transfer files over 4 GB and wanted a partition that you don't need to boot from but can still access on the same sd card.
AIUI you can create it but it will be useless, windows will only access the first partition on a SD card and the first partition on the SD card needs to be the fat32 boot partition and.
That may have been true with WINXP. It's not true with any modern supported version of Windows. They will hapily access any partition on any device as long as it's formatted with a filesystem type that's blessed by Windows.
Note: Having anything remotely humorous in your signature is completely banned on this forum. Wear a tinfoil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

raspnoobfan
Posts: 9
Joined: Sat Nov 03, 2018 5:09 am

Re: NTFS file partition?

Sun Jan 13, 2019 7:06 am

I was thinking since the NTFS partition is on the SD card is it no longer password protected the same way the raspbian OS is?
If so can a random attacker exploit that if you go online and infect your Raspberry with a virus?

User avatar
thagrol
Posts: 1681
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: NTFS file partition?

Sun Jan 13, 2019 4:41 pm

raspnoobfan wrote:
Sun Jan 13, 2019 7:06 am
I was thinking since the NTFS partition is on the SD card is it no longer password protected the same way the raspbian OS is?
If so can a random attacker exploit that if you go online and infect your Raspberry with a virus?
The password doesn't protect the OS or the partitions it just stops unauthorised folks from logging in. But if it's still the default it's no protection at all as this is well know.

As for going online, that depends on how you go online and what you're doing. For basic use: web, apt, etc it should be fairly safe as raspbian cannot run windows (or Mac OS) viruses. While linux viruses do exist there are far fewer of them, and those will likely have been created for x86 CPUs.

However, if you download an infected executable and later open/run it on it's target platform I can still infect your files.

To a large extent, it doesn't matter how the partition has been formatted. If windows/MacOS/x86 linux can write to it a virus running on that can infect the files.

Where you will hit problems with going online is if you start allowing incoming connections from the internet to your Pi.
This space unintentionally left blank.

raspnoobfan
Posts: 9
Joined: Sat Nov 03, 2018 5:09 am

Re: NTFS file partition?

Sun Jan 13, 2019 7:54 pm

I love the raspberry pi foundation. I learn so much about computers and electronics for something that was just a hobby by reading this forum. I thought the entire sd card was encrypted.

I like electronics so much that I think I might get a degree for it.

Return to “General discussion”