Re: PHP preg_match question

2011-07-20 Thread Kevin Brown

Another way would be

if ($vaidateStr == preg_replace("/[^a-z0-9\-]/i", "", $vaidateStr)) {
 /true, or valid...
}

the "i" after the last / makes it case insensitive. So it should match 
upper and lower alpha characters.



Ah yes, I also forgot the uppercase chars

 if ($vaidateStr == preg_replace("/[^a-zA-Z0-9\-]/", "", $vaidateStr)) {
/true, or valid...
 }

BTW also as Eric says, the carrot (^) inside the square brackets means
"anything but" (negation), thus how this works..

Ben

On Wed, Jul 20, 2011 at 9:38 PM, Eric Cope mailto:eric.c...@gmail.com>> wrote:

Here is the regular expression:

/^[a-zA-Z0-9\-]+$/

the ^ requires the pattern match at the beginning of the string.
The + requires at least one of these characters, but no upper limit.
You can use * if you don't need the lower limit of 1.
$ requires the patten match all the way to the end of the string.
The dash requires escaping, hence the back slash.

http://www.regular-expressions.info/anchors.html

Thanks,
Eric

On Wed, Jul 20, 2011 at 8:34 PM, keith smith mailto:klsmith2...@yahoo.com>> wrote:


Hi,

I have an input string that should only be lower or upper
alphas, numbers and can contain a hyphen.

I'm trying to figure out how to get PHP preg_match to verify the
input string only contains these chars.

I tried some thing like this and it always returns true if I
have one or more of the specified chars, even if I have a char
that is not specified.

I need a true for any string that contains Alphas and/or numbers
and/or one or more hyphens.  I need it to return if the string
contains anything else.

preg_match("/[a-z0-9\+\-]/", $vaidateStr)

I do not need to use preg_match, I'm looking for a simple solution.

Any pointers are much appreciated.


Keith Smith


---
PLUG-discuss mailing list -
PLUG-discuss@lists.plug.phoenix.az.us

To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss



---
PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us

To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss




--
---
Ben

/print ''.join(map(lambda x: chr(x), ( (ord('a')-(3*5)),
int(math.sqrt(math.pi*76)*5+2), int(math.ceil(math.e)*28),
int(math.floor(math.e)*35), long(abs(4%3*35+3)*2/



---
PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss


---
PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss


Re: East and West Stammtische

2011-07-20 Thread Brian Cluff

...and is the west side stammtisch even happening?

Brian

On 07/19/2011 02:00 PM, Dazed_75 wrote:

The calendar shows them both to be the third Tuesday of the month.  Is
that correct?

--
Dazed_75 a.k.a. Larry

The spirit of resistance to government is so valuable on certain
occasions, that I wish it always to be kept alive.
   - Thomas Jefferson



---
PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss


---
PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss


Re: PHP preg_match question

2011-07-20 Thread Ben Trussell
Ah yes, I also forgot the uppercase chars

if ($vaidateStr == preg_replace("/[^a-zA-Z0-9\-]/", "", $vaidateStr)) {
   /true, or valid...
}

BTW also as Eric says, the carrot (^) inside the square brackets means
"anything but" (negation), thus how this works..

Ben

On Wed, Jul 20, 2011 at 9:38 PM, Eric Cope  wrote:

> Here is the regular expression:
>
> /^[a-zA-Z0-9\-]+$/
>
> the ^ requires the pattern match at the beginning of the string.
> The + requires at least one of these characters, but no upper limit. You
> can use * if you don't need the lower limit of 1.
> $ requires the patten match all the way to the end of the string.
> The dash requires escaping, hence the back slash.
>
> http://www.regular-expressions.info/anchors.html
>
> Thanks,
> Eric
>
> On Wed, Jul 20, 2011 at 8:34 PM, keith smith wrote:
>
>>
>> Hi,
>>
>> I have an input string that should only be lower or upper alphas, numbers
>> and can contain a hyphen.
>>
>> I'm trying to figure out how to get PHP preg_match to verify the input
>> string only contains these chars.
>>
>> I tried some thing like this and it always returns true if I have one or
>> more of the specified chars, even if I have a char that is not specified.
>>
>> I need a true for any string that contains Alphas and/or numbers and/or
>> one or more hyphens.  I need it to return if the string contains anything
>> else.
>>
>> preg_match("/[a-z0-9\+\-]/", $vaidateStr)
>>
>> I do not need to use preg_match, I'm looking for a simple solution.
>>
>> Any pointers are much appreciated.
>>
>> 
>> Keith Smith
>> ---
>> PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us
>> To subscribe, unsubscribe, or to change your mail settings:
>> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>>
>
>
> ---
> PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>



-- 
---
Ben

*print ''.join(map(lambda x: chr(x), ( (ord('a')-(3*5)),
int(math.sqrt(math.pi*76)*5+2), int(math.ceil(math.e)*28),
int(math.floor(math.e)*35), long(abs(4%3*35+3)*2*
---
PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss

Re: PHP preg_match question

2011-07-20 Thread Matt Graham
From: keith smith 
> I have an input string that should only be lower or upper alphas,
> numbers and can contain a hyphen.  I'm trying to figure out how
> to get PHP preg_match to verify the input string only contains these
> chars.

> preg_match("/[a-z0-9\+\-]/", $vaidateStr) 

http://crow202.org/wordpress/
There is no Darkness in Eternity/But only Light too dim for us to see

---
PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss


Re: PHP preg_match question

2011-07-20 Thread Eric Cope
Here is the regular expression:

/^[a-zA-Z0-9\-]+$/

the ^ requires the pattern match at the beginning of the string.
The + requires at least one of these characters, but no upper limit. You can
use * if you don't need the lower limit of 1.
$ requires the patten match all the way to the end of the string.
The dash requires escaping, hence the back slash.

http://www.regular-expressions.info/anchors.html

Thanks,
Eric

On Wed, Jul 20, 2011 at 8:34 PM, keith smith  wrote:

>
> Hi,
>
> I have an input string that should only be lower or upper alphas, numbers
> and can contain a hyphen.
>
> I'm trying to figure out how to get PHP preg_match to verify the input
> string only contains these chars.
>
> I tried some thing like this and it always returns true if I have one or
> more of the specified chars, even if I have a char that is not specified.
>
> I need a true for any string that contains Alphas and/or numbers and/or one
> or more hyphens.  I need it to return if the string contains anything else.
>
> preg_match("/[a-z0-9\+\-]/", $vaidateStr)
>
> I do not need to use preg_match, I'm looking for a simple solution.
>
> Any pointers are much appreciated.
>
> 
> Keith Smith
> ---
> PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>
---
PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss

Re: PowerPC Recommendations

2011-07-20 Thread Ben Trussell
Its a *nix of another variety, but OpenBSD has a MacPPC port

Is Darrin C. on the list?  If so do you have the box set for 4.9 for sale?


Getting started
http://openbsd.org/

Getting ISO
http://openbsd.org/ftp.html

A more detailed bit of information specific to MacPPC port:
http://mirror.servihoo.net/pub/OpenBSD/4.9/macppc/INSTALL.macppc

Ben

On Wed, Jul 20, 2011 at 3:56 PM, Nathan England wrote:

> Thanks Eric, I appreciate your help. I didn't know about the OpenSUSE
> option. I will check that out first.
>
>
> On Wed, Jul 20, 2011 at 1:15 PM, Technomage Hawke <
> technomage.ha...@gmail.com> wrote:
>
>> I have had some experience with linux on PPC. just about all of them use
>> the dubs subsystem and depending on your specific logic board, may cause the
>> system to become unresponsive.
>>
>> that aside, the best distribution is debian or ubuntu (though debian may
>> have better application support). Opensuse also makes a PPC version of their
>> distribution. However, I have never tried an rpm based distribution.
>>
>> one of the items to know is that you may have to change the boot
>> parameters in your firmware in order to automatically boot your installed
>> systemm. I may be able to offer some assistance, but I need someone with a
>> pair of eyes to tell me what is happening. btw, orca and speech-dispatcher
>> will work in PPC versions, but it takes a little tweaking.
>>
>> let me know if you need some help.
>>
>> -Eric
>> 623-399-5635
>> On Jul 20, 2011, at 12:50 PM, Nathan England wrote:
>>
>> > Hello Hello,
>> >
>> > Someone just gave me 4 G3/G4 iMac's with OS 9 on them. I am not sure of
>> the specs yet, but I am interested to know if anyone has any experience with
>> Linux on these bad boys? I ran edUbuntu on a G3 years ago and it was
>> awful... I'm hoping the newer versions are better. Any thoughts?
>> >
>> > Nathan
>> >
>> > --
>> > 
>> > Nathan England
>> > I believe in the Constitution and the 4th Amendment. I am innocent and
>> have nothing to hide, but NO agent of the state crosses my threshhold
>> without a valid warrant signed by a judge and properly submitted. If we fail
>> to exercise our rights, we lose them.
>> > ---
>> > PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us
>> > To subscribe, unsubscribe, or to change your mail settings:
>> > http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>>
>> ---
>> PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us
>> To subscribe, unsubscribe, or to change your mail settings:
>> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>>
>
>
>
> --
> 
> Nathan England
> I believe in the Constitution and the 4th Amendment. I am innocent and have
> nothing to hide, but NO agent of the state crosses my threshhold without a
> valid warrant signed by a judge and properly submitted. If we fail to
> exercise our rights, we lose them.
>
> ---
> PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>



-- 
---
Ben

*print ''.join(map(lambda x: chr(x), ( (ord('a')-(3*5)),
int(math.sqrt(math.pi*76)*5+2), int(math.ceil(math.e)*28),
int(math.floor(math.e)*35), long(abs(4%3*35+3)*2*
---
PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss

Re: PHP preg_match question

2011-07-20 Thread Ben Trussell
Possibly:

$vaidateStr = "this is a test 1"; // not valid, contains spaces..
$compared = preg_replace("/[^a-z0-9\+\-]/", "", $vaidateStr);
$is_validated = $vaidateStr == $compared;

if ($is_validated) {
echo "valid\n";
}
else {
echo "not valid\n";
}

//
//OR just use (fewer lines, harder to read, etc)
//

if ($vaidateStr == preg_replace("/[^a-z0-9\+\-]/", "", $vaidateStr)) {
echo "valid\n";
}
else {
echo "not valid\n";
}


Ben

On Wed, Jul 20, 2011 at 8:34 PM, keith smith  wrote:

>
> Hi,
>
> I have an input string that should only be lower or upper alphas, numbers
> and can contain a hyphen.
>
> I'm trying to figure out how to get PHP preg_match to verify the input
> string only contains these chars.
>
> I tried some thing like this and it always returns true if I have one or
> more of the specified chars, even if I have a char that is not specified.
>
> I need a true for any string that contains Alphas and/or numbers and/or one
> or more hyphens.  I need it to return if the string contains anything else.
>
> preg_match("/[a-z0-9\+\-]/", $vaidateStr)
>
> I do not need to use preg_match, I'm looking for a simple solution.
>
> Any pointers are much appreciated.
>
> 
> Keith Smith
> ---
> PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>



-- 
---
Ben

*print ''.join(map(lambda x: chr(x), ( (ord('a')-(3*5)),
int(math.sqrt(math.pi*76)*5+2), int(math.ceil(math.e)*28),
int(math.floor(math.e)*35), long(abs(4%3*35+3)*2*
---
PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss

PHP preg_match question

2011-07-20 Thread keith smith

Hi,  

I have an input string that should only be lower or upper alphas, numbers and 
can contain a hyphen.  

I'm trying to figure out how to get PHP preg_match to verify the input string 
only contains these chars.

I tried some thing like this and it always returns true if I have one or more 
of the specified chars, even if I have a char that is not specified.

I need a true for any string that contains Alphas and/or numbers and/or one or 
more hyphens.  I need it to return if the string contains anything else.

preg_match("/[a-z0-9\+\-]/", $vaidateStr) 

I do not need to use preg_match, I'm looking for a simple solution.

Any pointers are much appreciated. 



Keith Smith---
PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss

Re: PowerPC Recommendations

2011-07-20 Thread Nathan England
Thanks Eric, I appreciate your help. I didn't know about the OpenSUSE
option. I will check that out first.

On Wed, Jul 20, 2011 at 1:15 PM, Technomage Hawke <
technomage.ha...@gmail.com> wrote:

> I have had some experience with linux on PPC. just about all of them use
> the dubs subsystem and depending on your specific logic board, may cause the
> system to become unresponsive.
>
> that aside, the best distribution is debian or ubuntu (though debian may
> have better application support). Opensuse also makes a PPC version of their
> distribution. However, I have never tried an rpm based distribution.
>
> one of the items to know is that you may have to change the boot parameters
> in your firmware in order to automatically boot your installed systemm. I
> may be able to offer some assistance, but I need someone with a pair of eyes
> to tell me what is happening. btw, orca and speech-dispatcher will work in
> PPC versions, but it takes a little tweaking.
>
> let me know if you need some help.
>
> -Eric
> 623-399-5635
> On Jul 20, 2011, at 12:50 PM, Nathan England wrote:
>
> > Hello Hello,
> >
> > Someone just gave me 4 G3/G4 iMac's with OS 9 on them. I am not sure of
> the specs yet, but I am interested to know if anyone has any experience with
> Linux on these bad boys? I ran edUbuntu on a G3 years ago and it was
> awful... I'm hoping the newer versions are better. Any thoughts?
> >
> > Nathan
> >
> > --
> > 
> > Nathan England
> > I believe in the Constitution and the 4th Amendment. I am innocent and
> have nothing to hide, but NO agent of the state crosses my threshhold
> without a valid warrant signed by a judge and properly submitted. If we fail
> to exercise our rights, we lose them.
> > ---
> > PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us
> > To subscribe, unsubscribe, or to change your mail settings:
> > http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>
> ---
> PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>



-- 

Nathan England
I believe in the Constitution and the 4th Amendment. I am innocent and have
nothing to hide, but NO agent of the state crosses my threshhold without a
valid warrant signed by a judge and properly submitted. If we fail to
exercise our rights, we lose them.
---
PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss

Re: PowerPC Recommendations

2011-07-20 Thread Stephen
I know that for odd multiboot situations I use refit. But I can't remember
if its available on ppc or not.
On Jul 20, 2011 1:15 PM, "Technomage Hawke" 
wrote:
> I have had some experience with linux on PPC. just about all of them use
the dubs subsystem and depending on your specific logic board, may cause the
system to become unresponsive.
>
> that aside, the best distribution is debian or ubuntu (though debian may
have better application support). Opensuse also makes a PPC version of their
distribution. However, I have never tried an rpm based distribution.
>
> one of the items to know is that you may have to change the boot
parameters in your firmware in order to automatically boot your installed
systemm. I may be able to offer some assistance, but I need someone with a
pair of eyes to tell me what is happening. btw, orca and speech-dispatcher
will work in PPC versions, but it takes a little tweaking.
>
> let me know if you need some help.
>
> -Eric
> 623-399-5635
> On Jul 20, 2011, at 12:50 PM, Nathan England wrote:
>
>> Hello Hello,
>>
>> Someone just gave me 4 G3/G4 iMac's with OS 9 on them. I am not sure of
the specs yet, but I am interested to know if anyone has any experience with
Linux on these bad boys? I ran edUbuntu on a G3 years ago and it was
awful... I'm hoping the newer versions are better. Any thoughts?
>>
>> Nathan
>>
>> --
>> 
>> Nathan England
>> I believe in the Constitution and the 4th Amendment. I am innocent and
have nothing to hide, but NO agent of the state crosses my threshhold
without a valid warrant signed by a judge and properly submitted. If we fail
to exercise our rights, we lose them.
>> ---
>> PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us
>> To subscribe, unsubscribe, or to change your mail settings:
>> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>
> ---
> PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
---
PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss

Re: PowerPC Recommendations

2011-07-20 Thread Technomage Hawke
I have had some experience with linux on PPC. just about all of them use the 
dubs subsystem and depending on your specific logic board, may cause the system 
to become unresponsive.

that aside, the best distribution is debian or ubuntu (though debian may have 
better application support). Opensuse also makes a PPC version of their 
distribution. However, I have never tried an rpm based distribution.

one of the items to know is that you may have to change the boot parameters in 
your firmware in order to automatically boot your installed systemm. I may be 
able to offer some assistance, but I need someone with a pair of eyes to tell 
me what is happening. btw, orca and speech-dispatcher will work in PPC 
versions, but it takes a little tweaking.

let me know if you need some help.

-Eric
623-399-5635
On Jul 20, 2011, at 12:50 PM, Nathan England wrote:

> Hello Hello,
> 
> Someone just gave me 4 G3/G4 iMac's with OS 9 on them. I am not sure of the 
> specs yet, but I am interested to know if anyone has any experience with 
> Linux on these bad boys? I ran edUbuntu on a G3 years ago and it was awful... 
> I'm hoping the newer versions are better. Any thoughts?
> 
> Nathan
> 
> -- 
> 
> Nathan England
> I believe in the Constitution and the 4th Amendment. I am innocent and have 
> nothing to hide, but NO agent of the state crosses my threshhold without a 
> valid warrant signed by a judge and properly submitted. If we fail to 
> exercise our rights, we lose them.
> ---
> PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss

---
PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss


PowerPC Recommendations

2011-07-20 Thread Nathan England
Hello Hello,

Someone just gave me 4 G3/G4 iMac's with OS 9 on them. I am not sure of the
specs yet, but I am interested to know if anyone has any experience with
Linux on these bad boys? I ran edUbuntu on a G3 years ago and it was
awful... I'm hoping the newer versions are better. Any thoughts?

Nathan

-- 

Nathan England
I believe in the Constitution and the 4th Amendment. I am innocent and have
nothing to hide, but NO agent of the state crosses my threshhold without a
valid warrant signed by a judge and properly submitted. If we fail to
exercise our rights, we lose them.
---
PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss

Re: Need Help Cloning a Drive

2011-07-20 Thread Joseph Sinclair
I feared this might be the case; clonezilla just isn't quite ready for the new 
sector sizes.

The best suggestion I can make from here is to create a partition table by hand 
on the destination drive that has the partition sizes and layout you want, then 
transfer the data one partition at a time.
You'll probably have to install GRUB in the MBR on the new drive to make it 
bootable.
Someone else here probably knows how to do this better than I do, but here's my 
take:
1) transfer all the data
2) remove the old drive and put the new drive in place
3) boot from a live "rescue" type CD (the latest system rescue CD works well 
here)
4) mount the new drive root partition and chroot to it's mount point.
5) check and adjust /etc/fstab to mount all of the other partitions in the 
correct places.  Make sure you use UUID's for this, as System Rescue CD creates 
odd device names sometimes.
6) mount everything like you would when running (this may not be required, but 
it's just for completeness)
7) check everything looks like you expect.
8) verify /boot is correct and has the correct kernel(s)
9) check your grub configuration in /etc
10) run the grub installer and grub configuration to install GRUB on the MBR of 
the new drive, and setup the GRUB menu/configuration/modules to boot properly.
11) exit the chroot, shutdown the system, pull out the rescue CD, and reboot.
*) You should now have a bootable clone drive, if everything worked.

Note: If you have Windows in dual boot on the old drive it almost certainly 
won't be bootable on the new drive and will need to be reinstalled.


On 07/19/2011 10:03 PM, Mark Phillips wrote:
> Well, using the proportional clone option in clonezilla failed as well.
> 
> These are the drives I have:
> orca:/home/mark# fdisk -l
> 
> Disk /dev/sda: 320.1 GB, 320072933376 bytes
> 255 heads, 63 sectors/track, 38913 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> Disk identifier: 0x81d6785f
> 
>Device Boot  Start End  Blocks   Id  System
> /dev/sda1   1   5   40131   de  Dell Utility
> /dev/sda2   *   6191815367  HPFS/NTFS
> /dev/sda31918701740963092+   7  HPFS/NTFS
> /dev/sda47018   38913   2562046205  Extended
> /dev/sda5   *7018   37615   245778403+  83  Linux
> /dev/sda6   37616   3891310426153+  82  Linux swap / Solaris
> Note: sector size is 4096 (not 512)
> 
> Disk /dev/sdb: 750.2 GB, 750156374016 bytes
> 255 heads, 63 sectors/track, 11400 cylinders
> Units = cylinders of 16065 * 4096 = 65802240 bytes
> Sector size (logical/physical): 4096 bytes / 4096 bytes
> I/O size (minimum/optimal): 4096 bytes / 4096 bytes
> Disk identifier: 0x4ae6
> 
>Device Boot  Start End  Blocks   Id  System
> orca:/home/mark#
> 
> The proportional setting got as far as creating the partition table and
> sda1. But then when it started on sda2, it failed saying there was no
> partition for sdb2, and so on for sdb3 - sdb6; these partitions did not
> exist. But that is what I thought cloning the "proportional" partition table
> was supposed to take into account. Clonezilla also reported that the target
> is smaller than the source, which is true based on sector counts if you
> don't take the size of the sectors into account.
> 
> Googling for 'linux clone hard drive different sector size' and similar
> strings did not yield any helpful strategies.
> 
> I would love to turn this wonderful 750 GB hard drive into something useful.
> Does anyone have some suggestions for cloning a 512b sector drive to a 4096b
> sector drive?
> 
> Thanks,
> 
> Mark
> 
> On Mon, Jul 18, 2011 at 6:39 AM, Mark Phillips
> wrote:
> 
>> Joseph,
>>
>> Thanks. I thought that might be a problem, and clonezilla has the option
>> for a proportional partition table. I will try that tonight.
>>
>> Mark
>>
>>
>> On Sun, Jul 17, 2011 at 11:24 PM, Joseph Sinclair <
>> plug-discuss...@stcaz.net> wrote:
>>
>>> You're dealing with something that's affecting more people.
>>> The old drive has what *was* the normal sector size for MANY years, 512
>>> bytes.
>>> The new drive has what *is now* becoming standard, 4096 bytes.
>>>
>>> The 'use the partition table from the source' option in clonezilla is not
>>> going to work.
>>> You CANNOT use a partition table for a 512 byte sector size directly on a
>>> disk with 4096 byte sectors.  The partition table records a number of
>>> sectors, and you're copying it without translation, so the new drive thinks
>>> it has partitions 8 times the size of the old; and the later ones run off
>>> the end of the disk.
>>> I'm not familiar with clonezilla, but I think there are options to
>>> configure a destination partition table "proportional" to the source. That's
>>> a bit more complex, but it's probably the only way to make it wor