Re: From dual- to single-boot

2017-07-25 Thread Joel Rees
On Tue, Jul 25, 2017 at 2:40 PM, solitone  wrote:
> On Tuesday, 25 July 2017 14:25:59 CEST Joel Rees wrote:
>> Can you boot without the Mac OS partition?
>
> I'm using grub to boot debian.
>
> To boot MacOS, I need to press the option key (⌥)  to start up to Apple's
> Startup Manager, rather than grub. Startup Manager allows me to choose the
> MacOS partition, and boot that one.

The reason I ask is that, at least in the past, at least in some
configurations, you needed a bootable Mac partition to boot
anything else. And it might be easy to forget if you had such a
setup and had not been using Mac OS for a while.

Just one more thing to check.

Personally, I've been bitten by a botched partition move in the past,
so I'd tend to avoid moving partitions anyway, if not using LVM.

And if I needed the extra 20G, I'd be foreseeing needing more pretty
soon, so I'd be planning on buying a second drive pretty soon.

Or I could delete the Mac OS partition (after backing anything important
up, of course) and make sure it still boots after formatting the partition for
Linux. If it doesn't it will be much easier to re-install the Mac OS and
necessary boot stuff before you try anything fancy.

Then, instead of moving partitions around, I'd look for what needs the
extra space, and mount the former Mac OS partition there. For instance
if it's space for backups, mount the partition as /backup2/ or
/home/sharedbackup/ or something.

Or, if I could wait, I'd hold things off until I upgrade to a new version,
and restructure my drive(s) while doing the upgrade.

LVM helps avoid botching things when you move things and resize
a lot, and it has better recovery options than when you move things
with a partition editor, so if you think you might be moving things
around a lot, you should look into LVM, as someone else has already
suggested, either with a second drive or when you back up your data
and re-install from scratch on your next upgrade.

-- 
Joel Rees

One of these days I'll get someone to pay me
to design a language that combines the best of Forth and C.
Then I'll be able to leap wide instruction sets with a single #ifdef,
run faster than a speeding infinite loop with a #define,
and stop all integer size bugs with my bare cast.
http://defining-computers.blogspot.com/2017/06/reinventing-computers.html

More of my delusions:
http://reiisi.blogspot.com/2017/05/do-not-pay-modern-danegeld-ransomware.html
http://reiisi.blogspot.jp/p/novels-i-am-writing.html



Re: From dual- to single-boot

2017-07-25 Thread Pascal Hambourg

Le 25/07/2017 à 07:13, solitone a écrit :


I can't remember: is gparted available in debian's installation media?


Gparted is not available in the Debian installer. Only fdisk and parted 
are. The Debian installer partitioning tool, partman, is based on 
libparted too. It allows to resize a partition and its filesystem as 
Gparted does, but I do not think it allows to move a partition.


Maybe Gparted is available in Debian live images. I have never used 
Debian live, so I do not know.




Re: From dual- to single-boot

2017-07-24 Thread solitone
On Tuesday, 25 July 2017 14:25:59 CEST Joel Rees wrote:
> Can you boot without the Mac OS partition?

I'm using grub to boot debian.

To boot MacOS, I need to press the option key (⌥)  to start up to Apple's 
Startup Manager, rather than grub. Startup Manager allows me to choose the 
MacOS partition, and boot that one.
-- 
⢀⣴⠾⠻⢶⣦⠀ 
⣾⠁⢠⠒⠀⣿⡁Sent from my brain using neurons fueled by glucose.
⢿⡄⠘⠷⠚⠋⠀ 
⠈⠳⣄

Re: From dual- to single-boot

2017-07-24 Thread Joel Rees
On Mon, Jul 24, 2017 at 11:13 PM, solitone  wrote:
> I never use MacOs, so I want to just keep debian, so at least I'll put its 22
> GB space to better use. I used to keep it just for some sporadic firmware
> update, but frankly I don't think I'll need this again in the future.

Can you boot without the Mac OS partition?


> The issue is that MacOs is at the start of the disc:
>
> ~$
> ~$ sudo /sbin/parted /dev/sda print
> Model: ATA APPLE SSD SM0128 (scsi)
> Disk /dev/sda: 121GB
> Sector size (logical/physical): 512B/4096B
> Partition Table: gpt
> Disk Flags:
>
> Number  Start   End SizeFile system Name  Flags
>  1  20.5kB  210MB   210MB   fat32   EFI System Partition  boot,
> esp
>  2  210MB   22.6GB  22.4GB  hfs+
>  3  22.6GB  23.2GB  650MB   hfs+
>  4  23.2GB  31.2GB  8000MB  linux-swap(v1)  swap
>  5  31.4GB  121GB   89.8GB  ext4linux
> ~$
>
> I would use parted from the installation media to delete partitions 1-4,
> recreate the swap at the start (unless I decide to usa a file for the swap),
> and move/extend the ext4 partition.
>
> This seems a bit risky, though. I already asked this, but is there a way to
> completely backup my current system, so that I could quickly restore it on a
> blank new partition, in case everything goes wrong?
>
> I have daily backups of /home, /usr/local, and /etc. But in case I need to
> reinstall from scratch I think I need more.
>
> What's the best approach?
> --
> ⢀⣴⠾⠻⢶⣦⠀
> ⣾⠁⢠⠒⠀⣿⡁Sent from my brain using neurons fueled by glucose.
> ⢿⡄⠘⠷⠚⠋⠀
> ⠈⠳⣄
>



-- 
Joel Rees

One of these days I'll get someone to pay me
to design a language that combines the best of Forth and C.
Then I'll be able to leap wide instruction sets with a single #ifdef,
run faster than a speeding infinite loop with a #define,
and stop all integer size bugs with my bare cast.
http://defining-computers.blogspot.com/2017/06/reinventing-computers.html

More of my delusions:
http://reiisi.blogspot.com/2017/05/do-not-pay-modern-danegeld-ransomware.html
http://reiisi.blogspot.jp/p/novels-i-am-writing.html



Re: From dual- to single-boot

2017-07-24 Thread solitone
On Monday, 24 July 2017 21:01:37 CEST Pascal Hambourg wrote:
> AFAIK, parted (the command line program) cannot move the start of a
> partition and its contents. Only gparted (the GUI program) can.

Yes, Pascal, you're right:
> Note that after version 2.4, the following commands were removed:
> check, cp, mkfs, mkpartfs, move, resize.
[1]

I can't remember: is gparted available in debian's installation media? 
Otherwise I could try and run gparted live [2].

> With LVM you could have just created a new partition, use it as a
> physical volume (PV) to extend the volume group (VG) and use the new
> available space to extend or create logical volumes (LV).

When I installed I thought LVM would be overkill for a laptop, instead it 
would have been the right choice.

> With btrfs instead of ext4, you could have used a new partition to
> extend the existing filesystem.

Good to know. I chose ext4 simply because.. it was the default!

> - create an image of the partition with dd, partclone, partimage,
> clonezilla... (it must not be mounted read/write)
> - back up the filesystem contents with cp -a, rsync...
> 
> The image has the advantage of saving the filesystem metadata (UUID,
> LABEL...)

Thanks, these were the hints I needed. I think I'll go for the image.

[1] 
https://www.gnu.org/software/parted/manual/html_node/Command-explanations.html#Command-explanations
[2] http://gparted.org/livecd.php
-- 
⢀⣴⠾⠻⢶⣦⠀ 
⣾⠁⢠⠒⠀⣿⡁Sent from my brain using neurons fueled by glucose.
⢿⡄⠘⠷⠚⠋⠀ 
⠈⠳⣄



Re: From dual- to single-boot

2017-07-24 Thread Felix Miata
solitone composed on 2017-07-24 16:13 (UTC+0200):

> I never use MacOs, so I want to just keep debian, so at least I'll put its 22 
> GB space to better use. I used to keep it just for some sporadic firmware 
> update, but frankly I don't think I'll need this again in the future.

> The issue is that MacOs is at the start of the disc:

> ~$
> ~$ sudo /sbin/parted /dev/sda print
> Model: ATA APPLE SSD SM0128 (scsi)
> Disk /dev/sda: 121GB
> Sector size (logical/physical): 512B/4096B
> Partition Table: gpt
> Disk Flags: 
> 
> Number  Start   End SizeFile system Name  Flags
>  1  20.5kB  210MB   210MB   fat32   EFI System Partition  boot, 
> esp
>  2  210MB   22.6GB  22.4GB  hfs+
>  3  22.6GB  23.2GB  650MB   hfs+
>  4  23.2GB  31.2GB  8000MB  linux-swap(v1)  swap
>  5  31.4GB  121GB   89.8GB  ext4linux
> ~$

> I would use parted from the installation media to delete partitions 1-4, 
> recreate the swap at the start (unless I decide to usa a file for the swap), 
> and move/extend the ext4 partition.

> This seems a bit risky, though. I already asked this, but is there a way to 
> completely backup my current system, so that I could quickly restore it on a 
> blank new partition, in case everything goes wrong? 

> I have daily backups of /home, /usr/local, and /etc. But in case I need to 
> reinstall from scratch I think I need more. 

> What's the best approach? 

Something else to consider is converting that hfs+ space to Linux native space,
for use of an additional installation of Debian or any other Linux. e.g. you
could put unstable there as a way to contribute to the project by testing
pre-releases and reporting bugs, and then when the next release is officially
announced, you'll already have Buster. Once you have two installations, either
can be used as a convenient rescue tool for the other should the need arise.

Were you to replace the current SSD with a larger one, you'd have a relatively
convenient means to boot OS X were some issue that requires it to arise.
-- 
"The wise are known for their understanding, and pleasant
words are persuasive." Proverbs 16:21 (New Living Translation)

 Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

Felix Miata  ***  http://fm.no-ip.com/



Re: From dual- to single-boot

2017-07-24 Thread Pascal Hambourg

Le 24/07/2017 à 16:13, solitone a écrit :

I never use MacOs, so I want to just keep debian, so at least I'll put its 22
GB space to better use. I used to keep it just for some sporadic firmware
update, but frankly I don't think I'll need this again in the future.

~$ sudo /sbin/parted /dev/sda print
Model: ATA APPLE SSD SM0128 (scsi)
Disk /dev/sda: 121GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:

Number  Start   End SizeFile system Name  Flags
  1  20.5kB  210MB   210MB   fat32   EFI System Partition  boot,
esp
  2  210MB   22.6GB  22.4GB  hfs+
  3  22.6GB  23.2GB  650MB   hfs+
  4  23.2GB  31.2GB  8000MB  linux-swap(v1)  swap
  5  31.4GB  121GB   89.8GB  ext4linux

I would use parted from the installation media to delete partitions 1-4,
recreate the swap at the start (unless I decide to usa a file for the swap),
and move/extend the ext4 partition.


AFAIK, parted (the command line program) cannot move the start of a 
partition and its contents. Only gparted (the GUI program) can.


With LVM you could have just created a new partition, use it as a 
physical volume (PV) to extend the volume group (VG) and use the new 
available space to extend or create logical volumes (LV).


With btrfs instead of ext4, you could have used a new partition to 
extend the existing filesystem.



This seems a bit risky, though. I already asked this, but is there a way to
completely backup my current system, so that I could quickly restore it on a
blank new partition, in case everything goes wrong?


There are two main ways :
- create an image of the partition with dd, partclone, partimage, 
clonezilla... (it must not be mounted read/write)

- back up the filesystem contents with cp -a, rsync...

The image has the advantage of saving the filesystem metadata (UUID, 
LABEL...)