Skip to contentSkip to conversation

How to call dban fron grub ?

DISCUSSION J. Bakshi 3 participants 4 messages Aug 7, 2009 – Aug 10, 2009

lore
Share & tools
lore

J. Bakshi

author
#0 lore raw

Hello developers,

I think ( please correct me if I am wrong ) I need not say more about dban (Darik's Boot And Nuke); a HDD data eraser. dban is shipped with syslinux to fit into both Cd and USB stick. What I am trying to achieve is to call dban by grub2. As per the syslinux.cfg; calling dban with shell is done by

`````` syslinux.cfg ````````

LABEL  shell
KERNEL kernel.bzi
APPEND initrd=initrd.gz root=/dev/ram0 init=/rc nuke="exec ash"
`````````````````

dban comes as floppy image as dban_1_0_7_i386.ima which has the kernel and initrd image ( I have also confirmed by mount it through loopback device and get the same ). To call it from grub with loopback I have done as below [ Note: I have put dban_1_0_7_i386.ima in reiserfs partition (hd0,2) ]

``````````
menuentry "dban"
{
loopback loop (hd0,2)/dban_1_0_7_i386.ima
linux (loop)/kernel.bzi nuke="exec ash"
initrd (loop)/initrd.gz
}
````````````

Grub calls dban successfully but immediately computer restarts. It happens again and again whenever I call dban. Also checked by

linux (loop)/kernel.bzi root=/dev/ram0 init=(loop)/dban_1_0_7_i386.ima/rc nuke="exec ash"

but no luck.

Does anyone of you have the luck to call dban from grub2 ?

#1 lore raw

Am Freitag, den 07.08.2009, 22:47 +0530 schrieb J. Bakshi:

Quoted 24 lines

Hello developers,

I think ( please correct me if I am wrong ) I need not say more about dban (Darik's Boot And Nuke); a HDD data eraser. dban is shipped with syslinux to fit into both Cd and USB stick. What I am trying to achieve is to call dban by grub2. As per the syslinux.cfg; calling dban with shell is done by

`````` syslinux.cfg ````````

LABEL  shell
KERNEL kernel.bzi
APPEND initrd=initrd.gz root=/dev/ram0 init=/rc nuke="exec ash"
`````````````````

dban comes as floppy image as dban_1_0_7_i386.ima which has the kernel and initrd image ( I have also confirmed by mount it through loopback device and get the same ). To call it from grub with loopback I have done as below [ Note: I have put dban_1_0_7_i386.ima in reiserfs partition (hd0,2) ]

``````````
menuentry "dban"
{
loopback loop (hd0,2)/dban_1_0_7_i386.ima
linux (loop)/kernel.bzi nuke="exec ash"
initrd (loop)/initrd.gz
}
````````````
Quoted 9 lines

Grub calls dban successfully but immediately computer restarts. It happens again and again whenever I call dban. Also checked by

linux (loop)/kernel.bzi root=/dev/ram0 init=(loop)/dban_1_0_7_i386.ima/rc nuke="exec ash"

but no luck.

Does anyone of you have the luck to call dban from grub2 ?

Try with the old linux loader with linux16 and initrd16

Signature · 2 lines
Felix Zielcke
Proud Debian Maintainer
author
#2 lore raw

On Fri, 07 Aug 2009 19:35:09 +0200
Felix Zielcke <[email protected]> wrote:
[..........]

Quoted 6 lines
Quoted 4 lines

Does anyone of you have the luck to call dban from grub2 ?

Try with the old linux loader with linux16 and initrd16

[..........]

WORKING !! it is working :-) you are a hero.

#3 lore raw
Quoted 4 lines · J. Bakshi

On Fri, 07 Aug 2009 19:35:09 +0200
Felix Zielcke <[email protected]> wrote:
[..........]

Quoted 1 line
Quoted 1 line
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

Does anyone of you have the luck to call dban from grub2 ?

Try with the old linux loader with linux16 and initrd16

[..........]

WORKING !! it is working :-) you are a hero.

I wonder why doesn't our current linux loader fail gracefuly and tell user to use linux16. I thought we had code specifically to do this!

if (! (lh.loadflags & GRUB_LINUX_FLAG_BIG_KERNEL))
{
grub_error (GRUB_ERR_BAD_OS, "zImage doesn't support 32-bit boot"

#ifdef GRUB_MACHINE_PCBIOS
                  " (try with `linux16')"
#endif
                  );
      goto fail;
    }

/* FIXME: 2.03 is not always good enough (Linux 2.4 can be 2.03 and
still not support 32-bit boot. */
if (lh.header != grub_cpu_to_le32 (GRUB_LINUX_MAGIC_SIGNATURE)

      || grub_le_to_cpu16 (lh.version) < 0x0203)
    {
      grub_error (GRUB_ERR_BAD_OS, "version too old for 32-bit boot"
#ifdef GRUB_MACHINE_PCBIOS
                  " (try with `linux16')"
#endif
                  );
      goto fail;
    }
Signature · 5 lines
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."