Received: from list by lists.gnu.org with archive (Exim 4.71) id 1dXAi3-0000AY-K5 for mharc-grub-devel@gnu.org; Mon, 17 Jul 2017 14:25:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56377) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dXAi0-00008l-OU for grub-devel@gnu.org; Mon, 17 Jul 2017 14:25:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dXAhy-0000MC-2X for grub-devel@gnu.org; Mon, 17 Jul 2017 14:25:28 -0400 Received: from smtp303.alice.it ([82.57.200.119]:50915) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dXAhx-0000Lp-MU for grub-devel@gnu.org; Mon, 17 Jul 2017 14:25:26 -0400 Received: from feu7-alice (82.57.204.62) by smtp303.alice.it (8.6.060.43) id 5895009A072B96BB; Mon, 17 Jul 2017 20:25:23 +0200 Received: from (93.40.197.118) by webmail7b.pc.tim.it; Mon, 17 Jul 2017 20:25:23 +0200 Message-ID: <15d51cc341a.ingegneriaforense@alice.it> Date: Mon, 17 Jul 2017 20:25:23 +0200 (CEST) From: "ingegneriaforense@alice.it" Reply-To: "ingegneriaforense@alice.it" To: Subject: R: Re: R: Re: CAN GRUB DO WRITING OPERATIONS ON ATTACHED DRIVES ? Cc: cjwatson@ubuntu.com Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_98063_11587668.1500315923488" X-Originating-IP: 93.40.197.118:21946 X-Priority: 1 (Highest) Importance: high X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 82.57.200.119 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jul 2017 18:25:30 -0000 ------=_Part_98063_11587668.1500315923488 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Dear Colin, I apologize with you. I've used uppercase letter to only put in evidence my question. I had no intention to shouting. Thank very much. Your reply is what i was looking for. Best Regards. Vincenzo. Forensic Consultant Tribunale di Lecce Studio: Strada di Garibaldi - Contrada Paradisi 73010 Lequile (LE) cell: 339.7968555 skype: vincenzo.di_salvo ----Messaggio originale---- Da: cjwatson@ubuntu.com Data: 17-lug-2017 19.48 A: Ogg: Re: R: Re: CAN GRUB DO WRITING OPERATIONS ON ATTACHED DRIVES ? On Mon, Jul 17, 2017 at 07:21:49PM +0200, ingegneriaforense@alice.it wrote: > CAN GRUB IMPLICITLY WRITE TO A DRIVE ATTACHED TO A COMPUTER ? > > Implicitly means: without an explicit command from a user. Please stop SHOUTING; it's generally considered rather rude. GRUB intentionally has no general filesystem writing support. As far as I'm aware there are exactly four ways for it to send any write commands to disks: 1) The "save_env" command (grub-core/commands/loadenv.c) which writes key/value pairs to a small preallocated region of disk. This is used to communicate small amounts of information to the OS, such as whether the last request to boot a particular menu entry on only the next boot has been completed. 2) The "gptsync" command (grub-core/commands/gptsync.c), which does some MBR/GPT partition table mangling needed on some Apple models. 3) The similar "mactelbless" and "macppcbless" commands (grub-core/commands/macbless.c), which configure a file/directory on some Apple filesystems to be the 'blessed' boot image for that filesystem. 4) The "parttool" command (grub-core/commands/parttool.c, grub-core/parttool/), which can be used to make various modifications to MBR partition table entries. GRUB is scriptable, so it isn't possible to give a general answer to your question for all systems that might have custom configurations, but the default configuration files only use the "save_env" and "parttool" commands, the latter only in the case where a chainloadable operating system was detected on a disk using the MBR partition table format. In either case, it isn't going to write to a random USB device that's attached to a machine, although save_env might write to the device it believes holds /boot/grub/grubenv. The low-level disk handling code is in grub-core/disk/. -- Colin Watson [cjwatson@ubuntu.com] _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel ------=_Part_98063_11587668.1500315923488 Content-Type: text/html;charset="UTF-8" Content-Transfer-Encoding: quoted-printable Dear Colin,

I apologize with you. I've used uppercase letter to only= put in evidence my question. I had no intention to shouting.

Thank= very much.

Your reply is what i was looking for.

Best Regard= s.

Vincenzo.


Forensic Consultant
Tribunale di Lecce
Studio: Strada di Garibaldi - Contrada Paradisi
73010 Lequile (LE)<= br>
cell: 339.7968555
skype: vincenzo.di_salvo


----Messaggio originale----
Da: cjwatson@ubuntu.com
Data: 17-lug-2017= 19.48
A: <grub-devel@gnu.org>
Ogg: Re: R: Re: CAN GRUB DO WRIT= ING OPERATIONS ON ATTACHED DRIVES ?

On Mon, Jul 17, 2017 at 07:21:49= PM +0200, ingegneriaforense@alice.it wrote:
> CAN GRUB IMPLICITLY WRI= TE TO A DRIVE ATTACHED TO A COMPUTER ?
>
> Implicitly means: w= ithout an explicit command from a user.

Please stop SHOUTING; it's g= enerally considered rather rude.

GRUB intentionally has no general f= ilesystem writing support.  As far as
I'm aware there are exactly f= our ways for it to send any write commands
to disks:

1) The "sav= e_env" command (grub-core/commands/loadenv.c) which writes
  &= nbsp; key/value pairs to a small preallocated region of disk.  This is=
    used to communicate small amounts of information to = the OS, such as
    whether the last request to boot a pa= rticular menu entry on only the
    next boot has been co= mpleted.

2) The "gptsync" command (grub-core/commands/gptsync.c), w= hich does
    some MBR/GPT partition table mangling neede= d on some Apple models.

3) The similar "mactelbless" and "macppcble= ss" commands
    (grub-core/commands/macbless.c), which c= onfigure a file/directory on
    some Apple filesystems t= o be the 'blessed' boot image for that
    filesystem.
4) The "parttool" command (grub-core/commands/parttool.c,
 &n= bsp;  grub-core/parttool/), which can be used to make various
 = ;   modifications to MBR partition table entries.

GRUB is = scriptable, so it isn't possible to give a general answer to
your questi= on for all systems that might have custom configurations, but
the defaul= t configuration files only use the "save_env" and "parttool"
commands, t= he latter only in the case where a chainloadable operating
system was de= tected on a disk using the MBR partition table format.  In
either c= ase, it isn't going to write to a random USB device that's
attached to a= machine, although save_env might write to the device it
believes holds = /boot/grub/grubenv.

The low-level disk handling code is in grub-core= /disk/.

--
Colin Watson       = ;            &n= bsp;            = ;       [cjwatson@ubuntu.com]

________= _______________________________________
Grub-devel mailing list
Grub-= devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

<= /blockquote>
------=_Part_98063_11587668.1500315923488--