NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/59665: There should be a "boot -r" option (or similar) to boot into /rescue



The following reply was made to PR bin/59665; it has been noted by GNATS.

From: Christos Zoulas <christos%zoulas.com@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: gnats-admin%netbsd.org@localhost,
 netbsd-bugs%netbsd.org@localhost
Subject: Re: bin/59665: There should be a "boot -r" option (or similar) to
 boot into /rescue
Date: Sun, 21 Sep 2025 13:35:59 -0400

 --Apple-Mail=_A911FA4B-07D5-43B6-B42D-E25EBFA4E0A2
 Content-Transfer-Encoding: quoted-printable
 Content-Type: text/plain;
 	charset=us-ascii
 
 Index: sys/boot_flag.h
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: /cvsroot/src/sys/sys/boot_flag.h,v
 retrieving revision 1.8
 diff -u -p -r1.8 boot_flag.h
 --- sys/boot_flag.h     12 May 2024 10:34:56 -0000      1.8
 +++ sys/boot_flag.h     21 Sep 2025 17:34:15 -0000
 @@ -70,6 +70,9 @@
         case 'q': /* boot quietly */                            \
                 (retval) |=3D AB_QUIET;                           \
                 break;                                          \
 +       case 'r': /* Use /rescue/init instead of /sbin/init */  \
 +               (retval) |=3D RB_RESCUE;                          \
 +               break;                                          \
         case 's': /* boot to single user */                     \
                 (retval) |=3D RB_SINGLE;                          \
                 break;                                          \
 Index: sys/reboot.h
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: /cvsroot/src/sys/sys/reboot.h,v
 retrieving revision 1.26
 diff -u -p -r1.26 reboot.h
 --- sys/reboot.h        1 Jan 2020 22:57:17 -0000       1.26
 +++ sys/reboot.h        21 Sep 2025 17:34:15 -0000
 @@ -53,6 +53,7 @@
  #define        RB_STRING       0x00000400      /* use provided bootstr =
 */
  #define        RB_POWERDOWN    (RB_HALT|0x800) /* turn power off (or at =
 least halt) */
  #define RB_USERCONF    0x00001000      /* change configured devices */
 +#define RB_RESCUE      0x00002000      /* use /rescue/init */
 =20
  /*
   * Extra autoboot flags (passed by boot prog to kernel). See also
 Index: kern/init_main.c
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: /cvsroot/src/sys/kern/init_main.c,v
 retrieving revision 1.552
 diff -u -p -r1.552 init_main.c
 --- kern/init_main.c    8 May 2025 05:31:16 -0000       1.552
 +++ kern/init_main.c    21 Sep 2025 17:34:15 -0000
 @@ -1016,7 +1016,7 @@ start_init(void *arg)
                 panic("init: couldn't allocate argument space");
         p->p_vmspace->vm_maxsaddr =3D (void *)STACK_MAX(addr, =
 PAGE_SIZE);
 =20
 -       ipx =3D 0;
 +       ipx =3D (boothowto & RB_RESCUE) ? 3 : 0;
         while (1) {
                 if (boothowto & RB_ASKNAME) {
                         printf("init path");
 
 
 
 --Apple-Mail=_A911FA4B-07D5-43B6-B42D-E25EBFA4E0A2
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
 	filename=signature.asc
 Content-Type: application/pgp-signature;
 	name=signature.asc
 Content-Description: Message signed with OpenPGP
 
 -----BEGIN PGP SIGNATURE-----
 Comment: GPGTools - http://gpgtools.org
 
 iF0EARECAB0WIQS+BJlbqPkO0MDBdsRxESqxbLM7OgUCaNA3fwAKCRBxESqxbLM7
 OldUAKCoFxLVilvTb2ZpMAWbjVGYqCgNawCg715gC7YjnT+UYxLuc6ZRYTivvZs=
 =1Iwn
 -----END PGP SIGNATURE-----
 
 --Apple-Mail=_A911FA4B-07D5-43B6-B42D-E25EBFA4E0A2--
 


Home | Main Index | Thread Index | Old Index