LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-18-2019, 05:05 AM   #1
slcklnx
Member
 
Registered: Jan 2019
Posts: 144

Rep: Reputation: Disabled
system transfer


there are two ssd . one has Debian installed with an ext4 file system. I need to migrate Debian to a second ssd that has an ext2 file system. how to do it correctly?


what will need to be edited ? fstab? initrdfs?
 
Old 05-18-2019, 05:17 AM   #2
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Usually when you migrate an operating system from one disk to another, you migrate it en-masse, including the filesystem. Use CloneZilla or similar to do the job.
 
1 members found this post helpful.
Old 05-18-2019, 05:38 AM   #3
slcklnx
Member
 
Registered: Jan 2019
Posts: 144

Original Poster
Rep: Reputation: Disabled
can I change the file system during migration?
 
Old 05-18-2019, 05:51 AM   #4
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Quote:
Originally Posted by slcklnx View Post
can I change the file system during migration?
Not with CloneZilla as far as I know - you would have to copy individual files over or freshly install. However, the way ext is designed is that ext3 = ext2 + features, ext4 = ext3 + even more features. You can just use tune2fs to switch off all the ext3 and ext4 features on your ext4 system to effectively turn it into ext2.
 
1 members found this post helpful.
Old 05-18-2019, 05:54 AM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
why does it have to be ext2, why can't you use ext4.
 
2 members found this post helpful.
Old 05-18-2019, 08:53 AM   #6
slcklnx
Member
 
Registered: Jan 2019
Posts: 144

Original Poster
Rep: Reputation: Disabled
I need a non-journaling file system
 
1 members found this post helpful.
Old 05-18-2019, 09:02 AM   #7
slcklnx
Member
 
Registered: Jan 2019
Posts: 144

Original Poster
Rep: Reputation: Disabled
Well, or suddenly I would like to change ext4 to btrfs

cp -a -p -d -R will not help here?

ssd 1 =sda1
ssd2 =sdb
Code:
dd if=/dev/zero of=/dev/sdb
fdisk /dev/sdb
create partition
lsblk
sda
   sda1


sdb
   sdb1

mkfs.btrfs /dev/sdb1

mkdir vdisk
mkdir ssd1
mount ssd1 /dev/sda1
mount /dev/sdb1 vdisk/
cd ssd1
cp -a -d -p -R * /root/vdisk/
chroot vdisk
grub install

that's bullshit?
 
Old 05-18-2019, 09:03 AM   #8
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,879

Rep: Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317
you can even disable journaling on ext4, just I don't understand why do you want it?
 
1 members found this post helpful.
Old 05-18-2019, 09:07 AM   #9
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Quote:
Originally Posted by slcklnx View Post
I need a non-journaling file system
In that case, use ext4 and turn the has_journal feature off.

Code:
tune2fs -O ^has_journal /dev/filesystem
Do this to the filesystem offline.

Last edited by hydrurga; 05-18-2019 at 09:10 AM.
 
1 members found this post helpful.
Old 05-18-2019, 10:49 AM   #10
slcklnx
Member
 
Registered: Jan 2019
Posts: 144

Original Poster
Rep: Reputation: Disabled
that was a very helpful answer. I learned how to turn off logging. Thank you so much. but tell me is it possible to change like I wrote way above the file system to ext4 to btrfs?
 
Old 05-18-2019, 10:53 AM   #11
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,879

Rep: Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317
Quote:
Originally Posted by slcklnx View Post
tell me is it possible to change like I wrote way above the file system to ext4 to btrfs?
I do not really understand that. More or less correct. You need to create a new filesystem and copy all the files using cp, tar, rsync, whatever you want.

Just I don't know what is that chroot, /root/vdisk ...
You must not copy a running system.
 
1 members found this post helpful.
Old 05-18-2019, 11:38 AM   #12
slcklnx
Member
 
Registered: Jan 2019
Posts: 144

Original Poster
Rep: Reputation: Disabled
I can understand how you can copy the operating system to another file system different from the one on which it was installed
 
Old 05-18-2019, 11:46 AM   #13
slcklnx
Member
 
Registered: Jan 2019
Posts: 144

Original Poster
Rep: Reputation: Disabled
The operating system that I will copy is not running on machines. I install Gentoo on arm. and it's hard to explain what I will do. You do not pay attention to what I do. more important is the answer whether it is possible to copy a non-running operating system onto a disk with a different file system.
 
Old 05-18-2019, 12:57 PM   #14
toothandnail
Member
 
Registered: Apr 2007
Location: Oxfordshire, UK
Distribution: Arch, Sparky, Salix64
Posts: 120

Rep: Reputation: 25
Quote:
Originally Posted by slcklnx View Post
The operating system that I will copy is not running on machines. I install Gentoo on arm. and it's hard to explain what I will do. You do not pay attention to what I do. more important is the answer whether it is possible to copy a non-running operating system onto a disk with a different file system.
The answer is yes, with some limitations. Depending on how the system is set up, you may find that it will not load due to the wrong filesystem support in the initramfs (whatever that is in the case of the distro you're using). I hit that problem when I used cp -a to transfer an Arch system from ext4 to xfs. I could boot, but I needed to use the fallback initramfs, because the standard one did not have support for xfs during the early part of the boot.

Other than that and editing /etc/fstab to match new UUID or /dev/sdXX, the only other problem I've seen is if the system is set up for hybernation - that may mean that there is a UUID stored to let it know where to write the hibernation data to. That is annoying rather than fatal, and finding where that data is stored seems to differ from distro to distro.

The nice things is, unlike Windows, Linux does not care where files are located, so a copy (whether you use cp or rsync, etc.) will work fine.
 
2 members found this post helpful.
Old 05-18-2019, 05:09 PM   #15
slcklnx
Member
 
Registered: Jan 2019
Posts: 144

Original Poster
Rep: Reputation: Disabled
I corrected fstab
Code:
/dev/mmcblk0p1   /  ext2   errors=remount-ro 0  1


What needs to be changed in the initramfs? thanks for the answer
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
tftp transfer fails with "Transfer timed out." exception bupthebroker Linux - Software 4 05-15-2018 02:33 PM
Slow single file transfer, fast multiple transfer Manzano Linux - Networking 6 08-06-2013 11:39 AM
No transfer process shown during USB transfer mad.slacker Slackware 6 01-23-2010 03:48 PM
Sony PSP file transfer inaccurate transfer progress stratotak Linux - Newbie 3 01-02-2010 03:49 AM
Music transfer software for MP3 players using Media Transfer Protocol commandante Linux - Software 2 06-26-2007 11:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration