Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Format partition from ext4 to ntfs [solved]

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
outzen
Posts: 20
Joined: 2020-03-29 07:44

Format partition from ext4 to ntfs [solved]

#1 Post by outzen »

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.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Format partition from ext4 to ntfs

#2 Post by p.H »

You cannot seriously want to reformat /usr into NTFS ?

outzen
Posts: 20
Joined: 2020-03-29 07:44

Re: Format partition from ext4 to ntfs

#3 Post by outzen »

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?

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Format partition from ext4 to ntfs

#4 Post by p.H »

/usr contains a major part of system files.

outzen
Posts: 20
Joined: 2020-03-29 07:44

Re: Format partition from ext4 to ntfs

#5 Post by outzen »

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: 20
Joined: 2020-03-29 07:44

Re: Format partition from ext4 to ntfs

#6 Post by outzen »

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)

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Format partition from ext4 to ntfs

#7 Post by p.H »

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.

outzen
Posts: 20
Joined: 2020-03-29 07:44

Re: Format partition from ext4 to ntfs

#8 Post by outzen »

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:

Post Reply