public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] NVM on Gentoo Linux?
@ 2019-03-31  1:12 Tamer Higazi
  2019-03-31  7:38 ` Wols Lists
  2019-03-31 18:08 ` [gentoo-user] " Tamer Higazi
  0 siblings, 2 replies; 9+ messages in thread
From: Tamer Higazi @ 2019-03-31  1:12 UTC (permalink / raw
  To: gentoo-user

Hi people,

I get a 2TB NVMe M.2 for my machine, and I want to replace my very slow 
harddisk with this SDD.

I got the 2.5 hd, with (of course) Gentoo Linux and Windows 10....

This is my partitiion layout:

Device          Start        End   Sectors  Size Type
/dev/sda1        2048    1023999   1021952  499M Windows recovery 
environment
/dev/sda2     1024000    1228799    204800  100M EFI System
/dev/sda3     1228800    1261567     32768   16M Microsoft reserved
/dev/sda4     1261568  819202047 817940480  390G Microsoft basic data
/dev/sda5   819202048  821155839   1953792  954M Linux filesystem
/dev/sda6   821155840  918812671  97656832 46.6G Linux filesystem
/dev/sda7   918812672 1114124287 195311616 93.1G Linux filesystem
/dev/sda8  1114124288 1145374719  31250432 14.9G Linux filesystem
/dev/sda9  1145374720 1172328447  26953728 12.9G Linux swap


I'd like to mirror everything on the NVM and boot from that, with my 
existing Grub configuration....

Can somebody of you give me a good starting point ?
I think it has something todo with systemrescuecd which I would prepare 
on a USB stick and ... ... ...


For any advises I would kindly thank you.


best, Tamer



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] NVM on Gentoo Linux?
  2019-03-31  1:12 [gentoo-user] NVM on Gentoo Linux? Tamer Higazi
@ 2019-03-31  7:38 ` Wols Lists
  2019-03-31  8:08   ` Andreas Fink
  2019-03-31 18:08 ` [gentoo-user] " Tamer Higazi
  1 sibling, 1 reply; 9+ messages in thread
From: Wols Lists @ 2019-03-31  7:38 UTC (permalink / raw
  To: gentoo-user

On 31/03/19 02:12, Tamer Higazi wrote:
> Can somebody of you give me a good starting point ?
> I think it has something todo with systemrescuecd which I would prepare
> on a USB stick and ... ... ...
> 
Well, ...

Personally I'd leave Windows on the slow disk to discourage you from
using it ... :-)

Are you trying to replace a 2.5TB hard drive with a 2TB SSD? You can't
fit a quart into a pint pot!

Anyways, recreate the partitions on the SSD, then copy them using dd.
Assuming your SSD is the new sda and your old drive is sdb,

dd if=/dev/sdb1 of=/dev/sda1

MAKE SURE you get the drives right, or you'll trash the system! Make
sure also that the new partitions are the same size or larger than the
partitions you're going to replace.

Then live-boot into the new drive, and re-install EFI or whatever it is
you do to boot off that.


I'm planning to migrate my system soon, but I'm going to do that a bit
differently. I'll dd my home partition across (I've got hard-links
galore, so a cp or rsync or whatever will have massive conniptions).

Then I'll re-install gentoo, re-emerge all my programs, and re-create
etc/passwd and all the other configuration stuff - I haven't really
messed about with most of my config, so that isn't a problem.

Cheers,
Wol


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] NVM on Gentoo Linux?
  2019-03-31  7:38 ` Wols Lists
@ 2019-03-31  8:08   ` Andreas Fink
  2019-03-31 10:53     ` Wols Lists
  0 siblings, 1 reply; 9+ messages in thread
From: Andreas Fink @ 2019-03-31  8:08 UTC (permalink / raw
  To: gentoo-user

On Sun, 31 Mar 2019 08:38:43 +0100
Wols Lists <antlists@youngman.org.uk> wrote:

> I'm planning to migrate my system soon, but I'm going to do that a bit
> differently. I'll dd my home partition across (I've got hard-links
> galore, so a cp or rsync or whatever will have massive conniptions).

What's wrong with an "rsync -aH"? This preserves hard links (given that the target system
supports them.

I honestly don't think that a dd is necessary. I have copied several times from one
harddisk to another with different harddis partition sizes, but with enough free space on
the target.

I do the copying by booting a live usb stick, then I mount the source and the target
partitions, and issue the rsync command (If you need extended attributes to be synced
too, then there is an option for rsync too, e.g. ACL).
rsync -aH --numeric-ids /path/to/source /path/to/target/

Cheers
Andreas


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] NVM on Gentoo Linux?
  2019-03-31  8:08   ` Andreas Fink
@ 2019-03-31 10:53     ` Wols Lists
  2019-03-31 11:32       ` Andreas Fink
  0 siblings, 1 reply; 9+ messages in thread
From: Wols Lists @ 2019-03-31 10:53 UTC (permalink / raw
  To: gentoo-user

On 31/03/19 09:08, Andreas Fink wrote:
> On Sun, 31 Mar 2019 08:38:43 +0100
> Wols Lists <antlists@youngman.org.uk> wrote:
> 
>> I'm planning to migrate my system soon, but I'm going to do that a bit
>> differently. I'll dd my home partition across (I've got hard-links
>> galore, so a cp or rsync or whatever will have massive conniptions).
> 
> What's wrong with an "rsync -aH"? This preserves hard links (given that the target system
> supports them.

It chews up RAM like it's going out of fashion?
> 
> I honestly don't think that a dd is necessary. I have copied several times from one
> harddisk to another with different harddis partition sizes, but with enough free space on
> the target.
> 
> I do the copying by booting a live usb stick, then I mount the source and the target
> partitions, and issue the rsync command (If you need extended attributes to be synced
> too, then there is an option for rsync too, e.g. ACL).
> rsync -aH --numeric-ids /path/to/source /path/to/target/
> 
If I'm booting off a live-CD or similar, then I'm not worried about the
system being available for use, and streaming the data at a level BELOW
the file system is far more efficient and quicker.

Seriously, I'm worried that the number of hard links could push the
system into thrashing, at which point an rsync will appear to die ...
(been there done that).

Brute-force copying the partition just seems so much easier than
worrying about the contents of the file system on it.

Cheers,
Wol



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] NVM on Gentoo Linux?
  2019-03-31 10:53     ` Wols Lists
@ 2019-03-31 11:32       ` Andreas Fink
  2019-03-31 14:14         ` Mick
  0 siblings, 1 reply; 9+ messages in thread
From: Andreas Fink @ 2019-03-31 11:32 UTC (permalink / raw
  To: gentoo-user

On Sun, 31 Mar 2019 11:53:19 +0100
Wols Lists <antlists@youngman.org.uk> wrote:

> If I'm booting off a live-CD or similar, then I'm not worried about the
> system being available for use, and streaming the data at a level BELOW
> the file system is far more efficient and quicker.

It's only faster if your disk is almost fully used. If you have a lot of free disk space
your method is doing a dumb clone of unused space. So it's argueable which method is
faster ;)
Your method neither allows changing of partition sizes nor a change on the underlying
filesystems. Maybe it's worth thinking about about another filesystem, when you switch
from classic HDD to SSD.

Cheers
Andreas


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] NVM on Gentoo Linux?
  2019-03-31 11:32       ` Andreas Fink
@ 2019-03-31 14:14         ` Mick
  2019-03-31 16:05           ` Rich Freeman
  0 siblings, 1 reply; 9+ messages in thread
From: Mick @ 2019-03-31 14:14 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1102 bytes --]

On Sunday, 31 March 2019 12:32:55 BST Andreas Fink wrote:
> On Sun, 31 Mar 2019 11:53:19 +0100
> 
> Wols Lists <antlists@youngman.org.uk> wrote:
> > If I'm booting off a live-CD or similar, then I'm not worried about the
> > system being available for use, and streaming the data at a level BELOW
> > the file system is far more efficient and quicker.
> 
> It's only faster if your disk is almost fully used. If you have a lot of
> free disk space your method is doing a dumb clone of unused space. So it's
> argueable which method is faster ;)
> Your method neither allows changing of partition sizes nor a change on the
> underlying filesystems. Maybe it's worth thinking about about another
> filesystem, when you switch from classic HDD to SSD.
> 
> Cheers
> Andreas

partclone is a more intelligent solution than dd, skipping any free disk space 
to clone a complete disk, or if required individual partitions.  Unlike rsync 
it will copy over partition boot records thus retaining UUIDs, which means 
MSWindows should be able to boot again without needing to use BCDedit et al.

-- 
Regards,
Mick

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] NVM on Gentoo Linux?
  2019-03-31 14:14         ` Mick
@ 2019-03-31 16:05           ` Rich Freeman
  2019-03-31 17:06             ` Wols Lists
  0 siblings, 1 reply; 9+ messages in thread
From: Rich Freeman @ 2019-03-31 16:05 UTC (permalink / raw
  To: gentoo-user

On Sun, Mar 31, 2019 at 10:14 AM Mick <michaelkintzios@gmail.com> wrote:
>
> On Sunday, 31 March 2019 12:32:55 BST Andreas Fink wrote:
> > On Sun, 31 Mar 2019 11:53:19 +0100
> >
> > Wols Lists <antlists@youngman.org.uk> wrote:
> > > If I'm booting off a live-CD or similar, then I'm not worried about the
> > > system being available for use, and streaming the data at a level BELOW
> > > the file system is far more efficient and quicker.
> >
> > It's only faster if your disk is almost fully used. If you have a lot of
> > free disk space your method is doing a dumb clone of unused space. So it's
> > argueable which method is faster ;)
> > Your method neither allows changing of partition sizes nor a change on the
> > underlying filesystems. Maybe it's worth thinking about about another
> > filesystem, when you switch from classic HDD to SSD.
> >
> > Cheers
> > Andreas
>
> partclone is a more intelligent solution than dd, skipping any free disk space
> to clone a complete disk, or if required individual partitions.  Unlike rsync
> it will copy over partition boot records thus retaining UUIDs, which means
> MSWindows should be able to boot again without needing to use BCDedit et al.
>

There is also clonezilla, which features bootable images and is
basically a GUI wrapper around a bunch of FOSS partition imaging/etc
tools.  I believe that it can resize partitions and so on, at least
for the linux-oriented ones.  I'm not sure if it can resize NTFS.  I
think it uses partimage (which I'm guessing is related to partclone),
which uses free-space mapping combined with block-level backups.  That
makes it good for backing up filesystems where full drivers are not
available - as long as the software can figure out which blocks are
discardable it can do a block-level backup efficiently without the
need to completely decipher the filesystem layout.

-- 
Rich


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] NVM on Gentoo Linux?
  2019-03-31 16:05           ` Rich Freeman
@ 2019-03-31 17:06             ` Wols Lists
  0 siblings, 0 replies; 9+ messages in thread
From: Wols Lists @ 2019-03-31 17:06 UTC (permalink / raw
  To: gentoo-user

On 31/03/19 17:05, Rich Freeman wrote:
> I believe that it can resize partitions and so on, at least
> for the linux-oriented ones.  I'm not sure if it can resize NTFS.

When I resize my Windows partitions (rarely) I use linux tools to do so.

(btw, my 2.5TB /home is pretty full :-)

Cheers,
Wol


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [gentoo-user] Re: NVM on Gentoo Linux?
  2019-03-31  1:12 [gentoo-user] NVM on Gentoo Linux? Tamer Higazi
  2019-03-31  7:38 ` Wols Lists
@ 2019-03-31 18:08 ` Tamer Higazi
  1 sibling, 0 replies; 9+ messages in thread
From: Tamer Higazi @ 2019-03-31 18:08 UTC (permalink / raw
  To: gentoo-user

Hi People,

My mistake.

I got 2TB 2.5HD that all, with boot manager, data everyhing should go on 
the SDD of the same size.

What steps would you advise me ?

Sorry, for missunderstandings.


best, Tamer



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-03-31 18:08 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-31  1:12 [gentoo-user] NVM on Gentoo Linux? Tamer Higazi
2019-03-31  7:38 ` Wols Lists
2019-03-31  8:08   ` Andreas Fink
2019-03-31 10:53     ` Wols Lists
2019-03-31 11:32       ` Andreas Fink
2019-03-31 14:14         ` Mick
2019-03-31 16:05           ` Rich Freeman
2019-03-31 17:06             ` Wols Lists
2019-03-31 18:08 ` [gentoo-user] " Tamer Higazi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox