Active Topics

 


Reply
Thread Tools
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#1
Hey all hacker-types,

I have created an ext3 partition on my USB HDD, and I cloned my Diablo to it. I then tried to boot from this partition, but my bootmenu just says N/A beside that option. Is it because the USB drive doesn't mount right away? Is there something I have to add to the initfs / bootmenu to get the drive to mount?

just for your info, it is /sys/block/sda/sda2

I have several working bootable partitions on my SD cards, I just wanted to try an actual HD and see what the speed difference is...

Thanks in advance!

EDIT: Got it working! See this post for the how-to.
__________________
qole.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!

Last edited by qole; 2008-08-24 at 00:25.
 

The Following 2 Users Say Thank You to qole For This Useful Post:
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#2
I notice that older versions of fanoush's bootmenu had a USB HD menu choice. Can someone post the details for that menu item here? fanoush? qwerty12?

This is what I have:
Code:
USB_HDD="sda"
MENU_5_NAME="External USB HDD"
MENU_5_ID="usbsda"
MENU_5_DEVICE="sda2"
MENU_5_MODULES="mbcache ext3"
MENU_5_FSTYPE="ext3"
MENU_5_FSOPTIONS="noatime"
[ -d "/sys/block/${USB_HDD}/${MENU_5_DEVICE}" ] || MENU_5_NAME="(${MENU_5_NAME}) N/A"
Perhaps there's something that has to be done to put the N800 into host mode (I do have the OTG dongle)?
__________________
qole.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!
 
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#3
Originally Posted by qole View Post
I notice that older versions of fanoush's bootmenu had a USB HD menu choice. Can someone post the details for that menu item here? fanoush? qwerty12?

This is what I have:
Code:
USB_HDD="sda"
MENU_5_NAME="External USB HDD"
MENU_5_ID="usbsda"
MENU_5_DEVICE="sda2"
MENU_5_MODULES="mbcache ext3"
MENU_5_FSTYPE="ext3"
MENU_5_FSOPTIONS="noatime"
[ -d "/sys/block/${USB_HDD}/${MENU_5_DEVICE}" ] || MENU_5_NAME="(${MENU_5_NAME}) N/A"
Perhaps there's something that has to be done to put the N800 into host mode (I do have the OTG dongle)?
It's still in the latest bootmenu, just only in bootmenu.sh and not bootmenu.conf.example.n8x0 (something like that) and bootmenu.conf, as you know, "overwrites" options in bootmenu.conf if it is present.

Anyway, this is the entries I took from bootmenu.sh:
MENU_4_NAME="USB hard drive"
MENU_4_ID="usb"
usb is a "special" identifer and is identifed in linuxrc as follows:
usb)
root_dev=sda1
root_dev_name="USB hard drive"
root_dev_set=1
root_fstype=""
root_fsoptions=""
;;
Fanoush has a command for setting the usb mode with a menu entry:
MENU_4_USBMODE=host
 
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#4
I added the line
Code:
MENU_5_USBMODE=host
..and I removed the line that makes it N/A. I also tried adding the stock USB command.

Still no luck.

Is there something else I can try (maybe I'm using the wrong device name? maybe I have to force-mount the partition?), or is there just no support for booting from a second partition on an external drive (sda2)?
__________________
qole.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!
 
Posts: 678 | Thanked: 197 times | Joined on Jul 2007 @ San Jose CA
#5
MENU_5_USBMODE=host

will let set_usb_mode() to set the IT in host mode but I still don't know at what time we have /sys/block/sda/sda2 ....

MENU_5_MODULES="mbcache ext3"
MENU_5_FSTYPE="ext3"

Don't you need jbd in MENU_5_MODULES ?
 
Posts: 2,152 | Thanked: 1,490 times | Joined on Jan 2006 @ Czech Republic
#6
Originally Posted by qole View Post
Is there something else I can try (maybe I'm using the wrong device name? maybe I have to force-mount the partition?), or is there just no support for booting from a second partition on an external drive (sda2)?
if you need sda2 don't use 'usb' id, it is hardcoded to sda1 in linuxrc. In that case fill same fields like with any card partition and enable host mode (if you don't have cable that does it for you).

Most probably there are two issues left (did not try)

1. there may be missing /dev/sda2 device node in initfs

2. there is timing problem, usb storage device discovery is slow

1 can be solved by creating it by hand (in initfs_flasher/initfs/dev) from another shell while initfs_flasher is waiting for dropbear/bootmenu.conf answer

2 can be solved by hacking end of bootmenu.sh, there is case for special ids so you may need to add similar one to the end after line that sets usb mode to host. Simple sleep should be enough.
__________________
Newbies click here before posting. Thanks.

If you really need to PM me with troubleshooting question please consider posting it to the forum instead. It is OK to PM me a link to such post then. Thank you.

Last edited by fanoush; 2008-08-22 at 07:15.
 

The Following 2 Users Say Thank You to fanoush For This Useful Post:
Benson's Avatar
Posts: 4,930 | Thanked: 2,272 times | Joined on Oct 2007
#7
Originally Posted by qole View Post
Hey all hacker-types,

I have created an ext3 partition on my USB HDD, and I cloned my Diablo to it. I then tried to boot from this partition, but my bootmenu just says N/A beside that option. Is it because the USB drive doesn't mount right away? Is there something I have to add to the initfs / bootmenu to get the drive to mount?
Well, note that saying N/A is a different problem from not being able to boot; you can still boot even if it wasn't detected at the time the boot-menu was generated. IIUC, it'll always be bracketed out (if you use the standard test), because you're not in host mode at the time it checks for the device. So do make sure you actually try booting it; though I guess you already did.
 

The Following User Says Thank You to Benson For This Useful Post:
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#8
nhanquy: Yes, I noticed the missing jbd. Thanks for pointing it out. Still no luck.
Benson: I did try booting it, no luck, and I have an OTG adapter so shouldn't that force host mode?
fanoush: You've suggested some very interesting things, but your "x can be solved" lines are way too vague and over my head. Can you give me more detailed instructions? Something I can edit in the /initfs_flasher folder before flashing? Lines I can paste into bootmenu.conf?

Originally Posted by fanoush View Post
1 can be solved by creating it by hand (in initfs_flasher/initfs/dev) from another shell while initfs_flasher is waiting for dropbear/bootmenu.conf answer
I don't have the initfs/dev file in my initfs_flasher folder.

Originally Posted by fanoush View Post
2 can be solved by hacking end of bootmenu.sh, there is case for special ids so you may need to add similar one to the end after line that sets usb mode to host. Simple sleep should be enough.
A specific example would be excellent and most appreciated here!
__________________
qole.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!

Last edited by qole; 2008-08-22 at 17:49.
 
Posts: 678 | Thanked: 197 times | Joined on Jul 2007 @ San Jose CA
#9
Originally Posted by qole View Post
[
I don't have the initfs/dev file in my initfs_flasher folder.
look under /mnt
 
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#10
Originally Posted by qole View Post
I don't have the initfs/dev file in my initfs_flasher folder.
Originally Posted by nhanquy View Post
look under /mnt
I don't have an initfs_flasher folder under /mnt either. I have an initfs folder, but fanoush wrote initfs_flasher.

Can I copy the file from /mnt/initfs/dev and drop it into the initfs_flasher folder somewhere and get it to copy over when I flash the initfs?

EDIT: AAHHH I think I get it. When the initfs_flasher process gets to the part where it is waiting for an answer from the user about dropbear, I open a second terminal window and "touch .../initfs_flasher/dev/sda2" ? Or maybe "cp .../initfs_flasher/dev/sda1 .../initfs_flasher/dev/sda2"? Then carry on with the install in the first window. Theoretically, this file will get copied over to the initfs.
__________________
qole.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!

Last edited by qole; 2008-08-22 at 23:32. Reason: I think I get it now...
 
Reply

Tags
bootmenu, external, harddrive, solved, usb


 
Forum Jump


All times are GMT. The time now is 13:22.