Format partition from ext4 to ntfs [solved]

Kernels & Hardware, configuring network, installing services

Format partition from ext4 to ntfs [solved]

Postby outzen » 2020-03-31 14:34

Im trying to figure out how to change format on my last partition - sda8 - currently formattet with ext4 (/usr)

Goal - would like to be able to map drives from windows and save windows files on the partition.
Have installed ntfs-3g support and tried formatting using
Code: Select all
mkfs.ntfs -f /dev/sda8

as root, but get "dev/sda8 is mounted" and when trying to umount "target is busy"

Using debian 8.8 on a HP laptop - with Raspberry desktop theme
Last edited by outzen on 2020-03-31 17:23, edited 1 time in total.
outzen
 
Posts: 19
Joined: 2020-03-29 07:44

Re: Format partition from ext4 to ntfs

Postby p.H » 2020-03-31 14:55

You cannot seriously want to reformat /usr into NTFS ?
p.H
 
Posts: 1511
Joined: 2017-09-17 07:12

Re: Format partition from ext4 to ntfs

Postby outzen » 2020-03-31 15:30

Dont no how to respond to that :-)

i.e. is there some kind of technical reason for this being a very bad idea, then please enlight me :-)

If I want to map drives from my windows box to the linux box, then i need to use the ntfs format - right?
outzen
 
Posts: 19
Joined: 2020-03-29 07:44

Re: Format partition from ext4 to ntfs

Postby p.H » 2020-03-31 15:44

/usr contains a major part of system files.
p.H
 
Posts: 1511
Joined: 2017-09-17 07:12

Re: Format partition from ext4 to ntfs

Postby outzen » 2020-03-31 16:16

hmm ... so where would these files go if i hadnt added the /usr partition?
I actually considered labelling it as "/data" when I created the partition during the installation, but thought it was better to use a standard "label/flag"

Will I have to start the installation process all over again, or is there another way to accomplish what Im trying to do?
outzen
 
Posts: 19
Joined: 2020-03-29 07:44

Re: Format partition from ext4 to ntfs

Postby outzen » 2020-03-31 16:25

i.e my plan was the following;
Code: Select all
/dev/sda1     boot     ntfs     Win     9,62gb
/dev/sda2                extended
        sda5     /root    ext4              31,5    gb
        sda6    /swap                        14,7    gb
        sda7    /home   ext4            195,2     gb
        sda8    /Data     ntfs            200     gb

however was not able to select ntfs during the installation process, so opted instead for an ext4 partition, and figured I could format it after the installation process ... guess I thought wrong :shock:
(ref the ntfs on sda1 boot: had to go for a multiboot system as I had issues booting into linux with my old laptop (HP Probook 6560b)
outzen
 
Posts: 19
Joined: 2020-03-29 07:44

Re: Format partition from ext4 to ntfs

Postby p.H » 2020-03-31 16:54

outzen wrote:so where would these files go if i hadnt added the /usr partition?

The contents of /usr would be part of the root filesystem. /usr would be used as a regular directory instead of as a mount point.

outzen wrote:Will I have to start the installation process all over again, or is there another way to accomplish what Im trying to do?

You can move/copy the contents of /usr to a temporary directory in the root filesystem (e.g. /usr-new), unmount /usr, and rename /usr-new as /usr. You will also have to update /etc/fstab and rebuild the initramfs to remove the early mount. I guess it will be easier to do this in a chroot from a live system or the initramfs shell instead of the running system.

outzen wrote:however was not able to select ntfs during the installation process, so opted instead for an ext4 partition, and figured I could format it after the installation process

You could have done that. Or just leave the partition alone during installation and format and mount it later.
The wrong part was to mount the partition on /usr which is a system directory. /Data was fine.
p.H
 
Posts: 1511
Joined: 2017-09-17 07:12

Re: Format partition from ext4 to ntfs

Postby outzen » 2020-03-31 17:23

Thks ... your feedback have made me do some more reading/googling abt partitioning in linux ... which - in hindsight - ofcause I should have done before :? -
I have done a lot of partitioning in windows - so thought I knew what I was doing :lol:
outzen
 
Posts: 19
Joined: 2020-03-29 07:44


Return to System configuration

Who is online

Users browsing this forum: No registered users and 21 guests

fashionable