Find the answer to your Linux question:
Results 1 to 5 of 5
Hello all, I was trying to hide some partitions from my USB flash drive using GRUB parttool but it failed. Error message received: 'error:(hd0,msdos2) write error. I was doing this ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    srj
    srj is offline
    Just Joined! srj's Avatar
    Join Date
    Jan 2012
    Location
    Bucharest
    Posts
    86

    GRUB parttool write error on usb


    Hello all,

    I was trying to hide some partitions from my USB flash drive using GRUB parttool but it failed.

    Error message received: 'error:(hd0,msdos2) write error.

    I was doing this to hide some debian iso's found on different partitions so that the installer would not recognize them both.

    string used:

    parttool (hd0,msdos2) hidden-
    parttool (hd0,msdos4) hidden+

    I am doing something wrong or it cannot be done on a USB drive? My own logic thinks the latter should work since the MBR partition table can be changed on USB's too but I am now stuck and your help is very appreciated.

    Thank you,
    Sergiu
    Last edited by srj; 06-29-2012 at 04:07 AM.

  2. #2
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,109
    Are you doing this from a Linux system installed on another internal hard drive? or are you booting from the flash drive? what are you trying to boot? The entries you have point to the first drive, 3rd and 4th partitions. Is that what you intend? Post more details and partition/drive information.

  3. #3
    srj
    srj is offline
    Just Joined! srj's Avatar
    Join Date
    Jan 2012
    Location
    Bucharest
    Posts
    86
    Sorry for the lack of information.

    Yes I have a linux system installed on my hard drive (debian).

    On an USB drive I have 4 partitions like below:

    /dev/sdb1 empty ntfs partition
    /dev/sdb2 debian installer 64 bit iso
    /dev/sdb3 partmagic + debian usb kernel + boot folder with grub
    /dev/sdb4 debian installer 32 bit iso

    The debian USB kernel is searching for debian valid iso's by default to install from and I can't have 2 iso's at the same time. I don't really know which one he will choose in my case, I just know they won't work simultaneous.
    So I though hiding one of them at a time will solve my troubles but as mentioned this never worked.

    Thank you for your reply,

  4. #4
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,109
    Does your Debian installation on the hard drive use Grub2?
    If it does, you should be able to put an entry in its grub.cfg file to boot either of the iso images. Below is an example I have to boot a remastered Linux Mint iso image from the Grub2 (grub.cfg) of Ubuntu 11.04:

    menuentry "Mint Remastered iso" {
    loopback loop (hd0,5)/mint12.iso
    linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/mint12.iso
    initrd (loop)/casper/initrd.gz
    }
    The loopback loop line above would need to be changed to reflect the partition. For the 64 Bit: (hd0,2), for the 32 bit (hd0,4). The exact and complete name of the iso file needs to be on that line. In the example above, it is "mint12.iso" and it is the / (root) directory of that partition. The linux and initrd lines for your Debian would also need to be changed and you can get that information by loop mounting each of the iso images and looking in the isolinux.cfg file. I would expect this to work. I've booted this successfully and started an install but never completed it so I'm not sure. Actually, not sure if this is exactly what you want either and I'm not a Debian user but I would guess that its Grub2 would work?

  5. #5
    srj
    srj is offline
    Just Joined! srj's Avatar
    Join Date
    Jan 2012
    Location
    Bucharest
    Posts
    86
    Hello Yancek,

    Thank you very much for your reply, I had no idea Grub2 can do that too. I had the impression only Grub4Dos can do it.

    Anyway, even though it's not that big of a deal right now, as I burned the ISO to a blank CD and installed from there, I was curios why the 'hidden partition' wouldn't work on my USB.

    If I do what you told me above and boot directly from the ISO the Debian installer will search for it's files on the CD as normally instructed to. That's why I needed the USB-Installer kernel. This kernel is searching for valid debian ISO's and install from there once an ISO is found and skip the CD mount / copy files, etc.

    Thank you for the reply again, I'll save your grub.cfg entry for future use.

    Cheers,
    Last edited by srj; 07-02-2012 at 11:11 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •