Menu

how to create a new bootable linux menu item

Help
2007-06-19
2013-04-05
  • schaapmansz

    schaapmansz - 2007-06-19

    goodday all, i have a question about creating menu items in the default file.

    i would like to create a menu item that whipes the harddrive. i would like to boot into linux and start:
    shred -vfz -n 7 /dev/hda

    what is the best way to do this?
    how to create a "small" bootable linux os, and let it automatically whipe the harddrive?

     
    • schaapmansz

      schaapmansz - 2007-06-20

      okee i guess i should have read some more!! :-)
      This is how i would go about it?

      # How can I put my own kernel for DRBL clients ?     ^TOP^
      Ex: The kernel you compiled yourself: name is 2.6.11-1.steven with CPU arch i686.
      a. Put these files to DRBL server
      1. 3 filres in /boot
      System.map-2.6.11-1.steven
      config-2.6.11-1.steven
      vmlinuz-2.6.11-1.steven
      2. put the kernel and modules in /lib/modules, like:
      /lib/modules/2.6.11-1.steven
      b. depmod -a 2.6.11-1.steven
      c. /opt/drbl/sbin/mknic-nbi -k 2.6.11-1.steven -i i686
      -k: specifly the kernel name
      -i: specify the CPU arch for DRBL clients, such as i386/i586/i686

       
      • Steven Shiau

        Steven Shiau - 2007-06-20

        Actually I am not sure what's your question, so it's not easy for us to answer you.
        If you mean you need some function to erase the harddisk, it depends on which way you want. You can do it manually in the command line prompt in  clonezilla live CD, or you can write a dialog menu to run the command
        shred -vfz -n 7 /dev/hda

         
    • schaapmansz

      schaapmansz - 2007-06-20

      OKee, this is what i would like to have.

      I would like to create an menu item (in pxelinux.cfg/default) that would say:
      Whipe:   Whipe entire harddrive

      When you choose that menu item, it should automatically start linux and the command:
      shred -vfz -n 7 /dev/hda

      how should i do that?

       
      • Steven Shiau

        Steven Shiau - 2007-06-20

        Looks like you mean you want to use grub/isolinux boot menu to do that. In that case, you have to hack a lot.
        Some draft I suggest:
        0. Put the kernel parameters in the append option in grub/isolinux config.
        1. You have to write a service (let call it shred.sh).
        2. The service shred.sh have to read the param/option from /proc/cmdline, then run command you want.
        You may refer to /etc/rc1.d/S19ocs-run in the DRBL client to do that. I believe there must be another solution. If you find better one, please let us know.

         
    • schaapmansz

      schaapmansz - 2007-06-20

      Hi steven, what did you mean by "dialog menu"?

      quote
      "You can do it manually in the command line prompt in clonezilla live CD, or you can write a dialog menu to run the command
      shred -vfz -n 7 /dev/hda  "
      \quote

      perhaps that is what i was looking for...

       
      • Steven Shiau

        Steven Shiau - 2007-06-21

        dialog is a problem to show the "dialog" menu, for example, when you run
        /opt/drbl/sbin/ocs
        it's based on dialog (or whiptail in Debian).
        I think you can just refer to /opt/drbl/sbin/ocs to learn how to write a dialog menu to run the programs you want.
        Good luck.

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.