SD card won't boot from partition. CANON Powershot S3 IS - page 2 - Hello, I'm a NEWBIE - HELP!! (Newbies assistance, User Guides and thank you notes) - CHDK Forum supplierdeeply

SD card won't boot from partition. CANON Powershot S3 IS

  • 22 Replies
  • 12738 Views
*

Offline zeno

  • *****
  • 891
Re: SD card won't boot from partition. CANON Powershot S3 IS
« Reply #10 on: 09 / December / 2011, 09:34:50 »
Advertisements
@mayid

There's a new version of LICKS (1.03A) http://www.zenoshrdlu.com/licks/licks.zip - if you set the "debug on" option it should produce a bit more information about the failing "fdisk -l" command. Could you download it and give it a try? Either post the log here or send it to daveATzenoshrdluDOT.com
A570, S100, Ixus 127
Author of ASSIST, STICK, WASP, ACID, SDMInst, LICKS, WICKS, MacBoot, UBDB, CFGEdit

Re: SD card won't boot from partition. CANON Powershot S3 IS
« Reply #11 on: 09 / December / 2011, 11:03:01 »
@outslider: Yes, i understand that now. But well, my issues are solved. Where are you stacked?

@waterwingz: that's the point. English is not my main language, so i got confused. I suggest a text like this for the wiki:

"Case 1: To start from zero, either format your card with the camera, or use GParted (or fdisk) to create a single partition in the SD card. But actually there's no need to format at all, because we can assume that the card is already usable. Make sure the format is FAT16 in any case. 
About Gparted: Note that making a single partition doesn't mean dividing the card in two parts, but creating a FAT16 (in this particullar case) formatted card."
 
@zeno: i'll give Licks a try and report the results by email.  8) Are you sure the only way to detect a flash disk is calculating the storage size, by the way?

Re: SD card won't boot from partition. CANON Powershot S3 IS
« Reply #12 on: 09 / December / 2011, 11:45:45 »
Could you download it and give it a try?
I tried this as well - Fedora16 64bit.

First of all,  I successfully formatted a 4G card as a single partion CHDK card and then as a dual partition CHDK card.

Strange sudo behaviour though.  It asks me for my sudo password when I start up in a new terminal window and run licks.sh but if I close and then rerun the licks.sh file from the same window,  it opens the app without needing the password again.   However,  if in the same terminal window I try fdisk -l I get no response - just the prompt back.  If I try sudo fdisk -l  I get a listing but need to type in my password each time.  So lick.sh seems to get a persistent sudo enabled status after the first run but fdisk needs a password each time.   Does that make sense and provide any clues ?


Minor nags (repeated from before) : The default window size still does not draw all the text & label boxes correctly. You have to drag the window to a much larger size.  That may be a function of the default font / font size on my system ?  And I still have to manually edit the licks.properties file after first running and closing licks to tell it that its okay to put a single partition on a 4G card.  Not sure how you discovered that there is a problem with 4G cards but I have 4 different brands of 4G SD card and they all work properly as single partition CHDK cards in either of my Canon cameras.

Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline zeno

  • *****
  • 891
Re: SD card won't boot from partition. CANON Powershot S3 IS
« Reply #13 on: 09 / December / 2011, 12:01:02 »
@mayid

LICKS uses several commands that require sudo permission, so avoiding fdisk wouldn't solve the permission problem. It uses a combination of mount, fdisk, df and file to discover the true size of the card, what partitions are present (and what type and size they are) as well as whether the card is read-only or read-write. Just as an example, it's perfectly possible for a wrongly formatted 4GB card to have just a single 2GB partition (i.e. only 2GB of usable space). LICKS will detect things like this (on my machine at any rate, if not on yours!) and let you put things right. 
A570, S100, Ixus 127
Author of ASSIST, STICK, WASP, ACID, SDMInst, LICKS, WICKS, MacBoot, UBDB, CFGEdit


*

Offline zeno

  • *****
  • 891
Re: SD card won't boot from partition. CANON Powershot S3 IS
« Reply #14 on: 09 / December / 2011, 12:22:35 »
@waterwingz
So my attempt to solve the window size problem didn't work. I'll have another look at the code. And I will alter the default value of max1size to 4000 in the next version so you get the choice for 4GB cards.

As I understand sudo, the permission is meant to last for some time (15 minutes by default?) so after a 'sudo somecommand' has asked for and been given a password, subsequent 'sudo somecommand' won't ask for it. The first version of LICKS tried to ask for a password and issue the sudo commands under the covers, but fell over because it sometimes tried to provide a password when one wasn't needed.

What LICKS does under the covers is use the exec method of the java Process class to run commands via bash. I think I don't need to use bash for most of the commands LICKS issues - I could pass them directly, but some commands (e.g. echo) do need bash. It may be that variations in bash environment variables are causing problems with sudo and fdisk.
A570, S100, Ixus 127
Author of ASSIST, STICK, WASP, ACID, SDMInst, LICKS, WICKS, MacBoot, UBDB, CFGEdit

Re: SD card won't boot from partition. CANON Powershot S3 IS
« Reply #15 on: 09 / December / 2011, 12:32:50 »
So my attempt to solve the window size problem didn't work. I'll have another look at the code. And I will alter the default value of max1size to 4000 in the next version so you get the choice for 4GB cards.
I tried changing my Gnome "default" system fonts & sizes but that did nothing.  Do you actually specify a font & size to use in your code ?

Quote
As I understand sudo, the permission is meant to last for some time (15 minutes by default?) so after a 'sudo somecommand' has asked for and been given a password, subsequent 'sudo somecommand' won't ask for it.
That's pretty much my understanding.  What's strange on my system is that fdisk runs without sudo but returns nothing.  With sudo it return what you would expect.  And when the sudo timeout window is active,  it still acts as if sudo is not there -  returning nothing.  Lick.sh will run in sudo mode (i.e. no password needed) so this suggests some sort of sudo setup - sudoers command comes to mind.  In previous systems, I used that to bypass the whole sudo password thing for my UUID but I seem to recall you an tailor it on a per command basis.  I wonder if other differences in that setup are causing your user problems ?
Ported :   A1200    SD940   G10    Powershot N    G16

Re: SD card won't boot from partition. CANON Powershot S3 IS
« Reply #16 on: 09 / December / 2011, 16:56:52 »
Quote
That's pretty much my understanding.  What's strange on my system is that fdisk runs without sudo but returns nothing.  With sudo it return what you would expect.
- same here.

About sudo time - maybe it's better tu run at start sudo su and then all commands will be run by root user (not regular user acting as root). This way there should be no timeout.
if (2*b || !2*b) {
    cout<<question
}

Compile error: poor Yorick

Re: SD card won't boot from partition. CANON Powershot S3 IS
« Reply #17 on: 09 / December / 2011, 18:19:04 »
Starting with sudo su session made no difference to me. Still don't have sudo permission, Licks says. And some buttons are disabled (refresh, by example).


Re: SD card won't boot from partition. CANON Powershot S3 IS
« Reply #18 on: 09 / December / 2011, 18:48:16 »
Sound more and more like a sudoers problem.

@mayid : what happens if you go into a terminal window and use the su command to switch to root (rather than sudo su) ?
Ported :   A1200    SD940   G10    Powershot N    G16

Re: SD card won't boot from partition. CANON Powershot S3 IS
« Reply #19 on: 09 / December / 2011, 19:28:20 »
@waterwingz
To use just su you'd have to know the root password and it's disabled on Ubuntu. The only way you get root terminal is sudo su. Of course, you could set the root password, but I think there's no difference between su and sudo su - both cause you to be logged as a root.

I'm pretty sure, that I have no problems with sudoers - I had no other problems when root is needed...

My sudoers:
Code: [Select]
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults env_reset

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root ALL=(ALL:ALL) ALL

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL

# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL

#includedir /etc/sudoers.d

if (2*b || !2*b) {
    cout<<question
}

Compile error: poor Yorick

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal