Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #206108 > unrolled thread
| Started by | Pierre Frenkiel <pierre.frenkiel@gmail.com> |
|---|---|
| First post | 2019-03-10 17:10 +0100 |
| Last post | 2019-03-11 00:00 +0100 |
| Articles | 12 — 3 participants |
Back to article view | Back to linux.debian.user
mkfs problem Pierre Frenkiel <pierre.frenkiel@gmail.com> - 2019-03-10 17:10 +0100
Re: mkfs problem Reco <recoverym4n@enotuniq.net> - 2019-03-10 17:40 +0100
Re: mkfs problem Pierre Frenkiel <pierre.frenkiel@gmail.com> - 2019-03-10 19:50 +0100
Re: mkfs problem Pascal Hambourg <pascal@plouf.fr.eu.org> - 2019-03-10 18:30 +0100
Re: mkfs problem Pierre Frenkiel <pierre.frenkiel@gmail.com> - 2019-03-10 19:50 +0100
Re: mkfs problem (half resolved) Pierre Frenkiel <pierre.frenkiel@gmail.com> - 2019-03-10 18:40 +0100
Re: mkfs problem (half resolved) Pascal Hambourg <pascal@plouf.fr.eu.org> - 2019-03-10 19:10 +0100
Re: mkfs problem (half resolved) Pierre Frenkiel <pierre.frenkiel@gmail.com> - 2019-03-10 20:00 +0100
Re: mkfs problem (half resolved) Pascal Hambourg <pascal@plouf.fr.eu.org> - 2019-03-10 20:40 +0100
Re: mkfs problem (half resolved) Pierre Frenkiel <pierre.frenkiel@gmail.com> - 2019-03-10 22:00 +0100
Re: mkfs problem (half resolved) Pascal Hambourg <pascal@plouf.fr.eu.org> - 2019-03-10 23:50 +0100
Re: mkfs problem (half resolved) Pierre Frenkiel <pierre.frenkiel@gmail.com> - 2019-03-11 00:00 +0100
| From | Pierre Frenkiel <pierre.frenkiel@gmail.com> |
|---|---|
| Date | 2019-03-10 17:10 +0100 |
| Subject | mkfs problem |
| Message-ID | <xA9bs-4zE-13@gated-at.bofh.it> |
hi,
I'm trying to fromat a nes USB flash drive and I get this:
==> mount | grep sdh
==> mkfs.vfat /dev/sdh1
mkfs.fat 4.1 (2017-01-24)
mkfs.vfat: /dev/sdh1 contains a mounted filesystem.
==> mkfs /dev/sdh1
works
any explanation?
best regards,
--
Pierre Frenkiel
[toc] | [next] | [standalone]
| From | Reco <recoverym4n@enotuniq.net> |
|---|---|
| Date | 2019-03-10 17:40 +0100 |
| Message-ID | <xA9Eu-4JX-9@gated-at.bofh.it> |
| In reply to | #206108 |
Hi. On Sun, Mar 10, 2019 at 05:01:34PM +0100, Pierre Frenkiel wrote: > hi, > I'm trying to fromat a nes USB flash drive and I get this: > > ==> mount | grep sdh > > ==> mkfs.vfat /dev/sdh1 > mkfs.fat 4.1 (2017-01-24) > mkfs.vfat: /dev/sdh1 contains a mounted filesystem. > > ==> mkfs /dev/sdh1 > works > > any explanation? /sbin/mkfs calls a different binary, /sbin/mkfs.ext2. Different utility does different checks. Reco
[toc] | [prev] | [next] | [standalone]
| From | Pierre Frenkiel <pierre.frenkiel@gmail.com> |
|---|---|
| Date | 2019-03-10 19:50 +0100 |
| Message-ID | <xAbGi-5Zi-23@gated-at.bofh.it> |
| In reply to | #206111 |
On Sun, 10 Mar 2019, Reco wrote: > Hi. > > On Sun, Mar 10, 2019 at 05:01:34PM +0100, Pierre Frenkiel wrote: >> hi, >> I'm trying to format a new USB flash drive and I get this: >> >> ==> mount | grep sdh >> >> ==> mkfs.vfat /dev/sdh1 >> mkfs.fat 4.1 (2017-01-24) >> mkfs.vfat: /dev/sdh1 contains a mounted filesystem. >> >> ==> mkfs /dev/sdh1 >> works >> >> any explanation? > > /sbin/mkfs calls a different binary, /sbin/mkfs.ext2. > Different utility does different checks. of course, but how do you explain that one of them think that it is mounted? As /dev/sdh1 was in /etc/mtab, it seems that mkfs.vfat uses mtab, and not mkfs.ext2! rather strange,isn't it?
[toc] | [prev] | [next] | [standalone]
| From | Pascal Hambourg <pascal@plouf.fr.eu.org> |
|---|---|
| Date | 2019-03-10 18:30 +0100 |
| Message-ID | <xAaqR-5h6-5@gated-at.bofh.it> |
| In reply to | #206108 |
Le 10/03/2019 à 17:01, Pierre Frenkiel a écrit : > hi, > I'm trying to fromat a nes USB flash drive and I get this: > > ==> mount | grep sdh > > ==> mkfs.vfat /dev/sdh1 > mkfs.fat 4.1 (2017-01-24) > mkfs.vfat: /dev/sdh1 contains a mounted filesystem. > > ==> mkfs /dev/sdh1 > works You should not format (and more generally write directly to) a block device which contains a mounted filesystem.
[toc] | [prev] | [next] | [standalone]
| From | Pierre Frenkiel <pierre.frenkiel@gmail.com> |
|---|---|
| Date | 2019-03-10 19:50 +0100 |
| Message-ID | <xAbGh-5Zi-7@gated-at.bofh.it> |
| In reply to | #206116 |
[Multipart message — attachments visible in raw view] — view raw
On Sun, 10 Mar 2019, Pascal Hambourg wrote: > Le 10/03/2019 à 17:01, Pierre Frenkiel a écrit : >> hi, >> I'm trying to format a new USB flash drive and I get this: >> >> ==> mount | grep sdh >> >> ==> mkfs.vfat /dev/sdh1 >> mkfs.fat 4.1 (2017-01-24) >> mkfs.vfat: /dev/sdh1 contains a mounted filesystem. >> >> ==> mkfs /dev/sdh1 >> works > > You should not format (and more generally write directly to) a block device > which contains a mounted filesystem. > not only should not, but you can't ... as I said previously, the flash drive was not actually mounted (mtab not updated)
[toc] | [prev] | [next] | [standalone]
| From | Pierre Frenkiel <pierre.frenkiel@gmail.com> |
|---|---|
| Date | 2019-03-10 18:40 +0100 |
| Subject | Re: mkfs problem (half resolved) |
| Message-ID | <xAaAx-5kF-1@gated-at.bofh.it> |
| In reply to | #206108 |
On Sun, 10 Mar 2019, Pierre Frenkiel wrote: > hi, > I'm trying to format a new USB flash drive and I get this: > > ==> mount | grep sdh > > ==> mkfs.vfat /dev/sdh1 > mkfs.fat 4.1 (2017-01-24) > mkfs.vfat: /dev/sdh1 contains a mounted filesystem. > > ==> mkfs /dev/sdh1 > works > I said half-resolved, as I found a line with /dev/sdh1 in /etc/mtab. Removing it solved the problem, but remains the question: why /etc/mtab was not updated? best regards, -- Pierre Frenkiel
[toc] | [prev] | [next] | [standalone]
| From | Pascal Hambourg <pascal@plouf.fr.eu.org> |
|---|---|
| Date | 2019-03-10 19:10 +0100 |
| Subject | Re: mkfs problem (half resolved) |
| Message-ID | <xAb3A-5KU-29@gated-at.bofh.it> |
| In reply to | #206117 |
Le 10/03/2019 à 18:36, Pierre Frenkiel a écrit : >> > I said half-resolved, as I found a line with /dev/sdh1 in /etc/mtab. > Removing it solved the problem, but remains the question: > why /etc/mtab was not updated? What kind of system are you using ? In current versions of Debian, /etc/mtab should be a symlink to /proc/mounts. As anything in /proc, this not a real file but an interface with the kernel. It should always be up to date and userland should not be able to write it.
[toc] | [prev] | [next] | [standalone]
| From | Pierre Frenkiel <pierre.frenkiel@gmail.com> |
|---|---|
| Date | 2019-03-10 20:00 +0100 |
| Subject | Re: mkfs problem (half resolved) |
| Message-ID | <xAbPX-62R-3@gated-at.bofh.it> |
| In reply to | #206119 |
[Multipart message — attachments visible in raw view] — view raw
On Sun, 10 Mar 2019, Pascal Hambourg wrote: > Le 10/03/2019 à 18:36, Pierre Frenkiel a écrit : >>> >> I said half-resolved, as I found a line with /dev/sdh1 in /etc/mtab. >> Removing it solved the problem, but remains the question: >> why /etc/mtab was not updated? > > What kind of system are you using ? Debian Stretch > > In current versions of Debian, /etc/mtab should be a symlink to /proc/mounts. on my laptop, mtab is actually a link to ../proc/self/mounts but on my desktop, it is a file, God knows why.
[toc] | [prev] | [next] | [standalone]
| From | Pascal Hambourg <pascal@plouf.fr.eu.org> |
|---|---|
| Date | 2019-03-10 20:40 +0100 |
| Subject | Re: mkfs problem (half resolved) |
| Message-ID | <xAcsF-6ws-13@gated-at.bofh.it> |
| In reply to | #206124 |
Le 10/03/2019 à 19:50, Pierre Frenkiel a écrit : > On Sun, 10 Mar 2019, Pascal Hambourg wrote: >> >> What kind of system are you using ? > > Debian Stretch >> >> In current versions of Debian, /etc/mtab should be a symlink to >> /proc/mounts. > > on my laptop, mtab is actually a link to ../proc/self/mounts /proc/mounts is actually a symlink to /proc/self/mounts. > but on my desktop, it is a file, God knows why. Was your desktop initially installed with a rather older Debian version and upgraded ?
[toc] | [prev] | [next] | [standalone]
| From | Pierre Frenkiel <pierre.frenkiel@gmail.com> |
|---|---|
| Date | 2019-03-10 22:00 +0100 |
| Subject | Re: mkfs problem (half resolved) |
| Message-ID | <xAdI6-7fp-11@gated-at.bofh.it> |
| In reply to | #206127 |
[Multipart message — attachments visible in raw view] — view raw
On Sun, 10 Mar 2019, Pascal Hambourg wrote: > Le 10/03/2019 à 19:50, Pierre Frenkiel a écrit : >> On Sun, 10 Mar 2019, Pascal Hambourg wrote: >>> >>> What kind of system are you using ? >> >> Debian Stretch >>> >>> In current versions of Debian, /etc/mtab should be a symlink to >>> /proc/mounts. >> >> on my laptop, mtab is actually a link to ../proc/self/mounts > > /proc/mounts is actually a symlink to /proc/self/mounts. > >> but on my desktop, it is a file, God knows why. > > Was your desktop initially installed with a rather older Debian version and > upgraded ? > it has been installed with Lenny, which is now an old version, but was at that time the current one... and then upgrade to Squeeze, Wheezy, Jessie and Stretch
[toc] | [prev] | [next] | [standalone]
| From | Pascal Hambourg <pascal@plouf.fr.eu.org> |
|---|---|
| Date | 2019-03-10 23:50 +0100 |
| Subject | Re: mkfs problem (half resolved) |
| Message-ID | <xAfqx-8nw-3@gated-at.bofh.it> |
| In reply to | #206137 |
Le 10/03/2019 à 21:58, Pierre Frenkiel a écrit : > On Sun, 10 Mar 2019, Pascal Hambourg wrote: > >> Le 10/03/2019 à 19:50, Pierre Frenkiel a écrit : >>> On Sun, 10 Mar 2019, Pascal Hambourg wrote: >>>> >>>> In current versions of Debian, /etc/mtab should be a symlink to >>>> /proc/mounts. >>> >>> on my laptop, mtab is actually a link to ../proc/self/mounts >> >> /proc/mounts is actually a symlink to /proc/self/mounts. >> >>> but on my desktop, it is a file, God knows why. >> >> Was your desktop initially installed with a rather older Debian >> version and upgraded ? >> > it has been installed with Lenny, which is now an old version, but was > at that time the current one... > and then upgrade to Squeeze, Wheezy, Jessie and Stretch I do not remember which version installed /etc/mtab as a symlink, but during the upgrade from the previous version it was offered to replace the regular file with a symlink. Maybe you answered "no" and /etc/mtab remained a regular file. Well, you can still replace it by hand now.
[toc] | [prev] | [next] | [standalone]
| From | Pierre Frenkiel <pierre.frenkiel@gmail.com> |
|---|---|
| Date | 2019-03-11 00:00 +0100 |
| Subject | Re: mkfs problem (half resolved) |
| Message-ID | <xAfAd-8r4-5@gated-at.bofh.it> |
| In reply to | #206139 |
[Multipart message — attachments visible in raw view] — view raw
On Sun, 10 Mar 2019, Pascal Hambourg wrote: > Le 10/03/2019 à 21:58, Pierre Frenkiel a écrit : >> On Sun, 10 Mar 2019, Pascal Hambourg wrote: >> >>> Le 10/03/2019 à 19:50, Pierre Frenkiel a écrit : >>>> On Sun, 10 Mar 2019, Pascal Hambourg wrote: >>>>> >>>>> In current versions of Debian, /etc/mtab should be a symlink to >>>>> /proc/mounts. >>>> >>>> on my laptop, mtab is actually a link to ../proc/self/mounts >>> >>> /proc/mounts is actually a symlink to /proc/self/mounts. >>> >>>> but on my desktop, it is a file, God knows why. >>> >>> Was your desktop initially installed with a rather older Debian version and >>> upgraded ? >>> >> it has been installed with Lenny, which is now an old version, but was >> at that time the current one... >> and then upgrade to Squeeze, Wheezy, Jessie and Stretch > > I do not remember which version installed /etc/mtab as a symlink, but during > the upgrade from the previous version it was offered to replace the regular > file with a symlink. Maybe you answered "no" and /etc/mtab remained a regular > file. Well, you can still replace it by hand now. I don't remember such a question, but that's actually what I did.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.user
csiph-web