BTRFS automatic subvols
This commit is contained in:
parent
e88626b6c4
commit
3f56e07b2a
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -833,7 +833,7 @@ checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae"
|
||||
|
||||
[[package]]
|
||||
name = "pika-installer-gtk4"
|
||||
version = "1.0.1"
|
||||
version = "1.0.2"
|
||||
dependencies = [
|
||||
"async-channel",
|
||||
"duct",
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "pika-installer-gtk4"
|
||||
version = "1.0.1"
|
||||
version = "1.0.2"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
@ -39,10 +39,18 @@ then
|
||||
yes | mkfs.btrfs -f /dev/${S_DISK}p4
|
||||
sleep 2
|
||||
# Begin Mounting
|
||||
mkdir -p /var/cache/root-mnt
|
||||
mount /dev/${S_DISK}p3 /var/cache/root-mnt
|
||||
btrfs subvolume create /var/cache/root-mnt/@
|
||||
#
|
||||
mkdir -p /var/cache/home-mnt
|
||||
mount /dev/${S_DISK}p4 /var/cache/home-mnt
|
||||
btrfs subvolume create /var/cache/home-mnt/@
|
||||
#
|
||||
mkdir -p /media/pika-install-mount
|
||||
mount /dev/${S_DISK}p3 /media/pika-install-mount/
|
||||
mount /dev/${S_DISK}p3 /media/pika-install-mount/ -o subvol=@
|
||||
mkdir -p /media/pika-install-mount/home
|
||||
mount /dev/${S_DISK}p4 /media/pika-install-mount/home
|
||||
mount /dev/${S_DISK}p4 /media/pika-install-mount/home -o subvol=@
|
||||
mkdir -p /media/pika-install-mount/boot
|
||||
mount /dev/${S_DISK}p2 /media/pika-install-mount/boot
|
||||
mkdir -p /media/pika-install-mount/boot/efi
|
||||
@ -57,10 +65,18 @@ then
|
||||
yes | mkfs.btrfs -f /dev/${S_DISK}4
|
||||
sleep 2
|
||||
# Begin Mounting
|
||||
mkdir -p /var/cache/root-mnt
|
||||
mount /dev/${S_DISK}3 /var/cache/root-mnt
|
||||
btrfs subvolume create /var/cache/root-mnt/@
|
||||
#
|
||||
mkdir -p /var/cache/home-mnt
|
||||
mount /dev/${S_DISK}4 /var/cache/home-mnt
|
||||
btrfs subvolume create /var/cache/home-mnt/@
|
||||
#
|
||||
mkdir -p /media/pika-install-mount
|
||||
mount /dev/${S_DISK}3 /media/pika-install-mount/
|
||||
mount /dev/${S_DISK}3 /media/pika-install-mount/ -o subvol=@
|
||||
mkdir -p /media/pika-install-mount/home
|
||||
mount /dev/${S_DISK}4 /media/pika-install-mount/home
|
||||
mount /dev/${S_DISK}4 /media/pika-install-mount/home -o subvol=@
|
||||
mkdir -p /media/pika-install-mount/boot
|
||||
mount /dev/${S_DISK}2 /media/pika-install-mount/boot
|
||||
mkdir -p /media/pika-install-mount/boot/efi
|
||||
@ -96,10 +112,18 @@ else
|
||||
yes | mkfs.btrfs -f /dev/mapper/crypt_home
|
||||
sleep 2
|
||||
# Begin Mounting
|
||||
mkdir -p /var/cache/root-mnt
|
||||
mount /dev/mapper/crypt_root /var/cache/root-mnt
|
||||
btrfs subvolume create /var/cache/root-mnt/@
|
||||
#
|
||||
mkdir -p /var/cache/home-mnt
|
||||
mount /dev/mapper/crypt_home /var/cache/home-mnt
|
||||
btrfs subvolume create /var/cache/home-mnt/@
|
||||
#
|
||||
mkdir -p /media/pika-install-mount
|
||||
mount /dev/mapper/crypt_root /media/pika-install-mount/
|
||||
mount /dev/mapper/crypt_root /media/pika-install-mount/ -o subvol=@
|
||||
mkdir -p /media/pika-install-mount/home
|
||||
mount /dev/mapper/crypt_home /media/pika-install-mount/home
|
||||
mount /dev/mapper/crypt_home /media/pika-install-mount/home -o subvol=@
|
||||
mkdir -p /media/pika-install-mount/boot
|
||||
mount /dev/${S_DISK}p2 /media/pika-install-mount/boot
|
||||
mkdir -p /media/pika-install-mount/boot/efi
|
||||
@ -118,10 +142,18 @@ else
|
||||
yes | mkfs.btrfs -f /dev/mapper/crypt_home
|
||||
sleep 2
|
||||
# Begin Mounting
|
||||
mkdir -p /var/cache/root-mnt
|
||||
mount /dev/mapper/crypt_root /var/cache/root-mnt
|
||||
btrfs subvolume create /var/cache/root-mnt/@
|
||||
#
|
||||
mkdir -p /var/cache/home-mnt
|
||||
mount /dev/mapper/crypt_home /var/cache/home-mnt
|
||||
btrfs subvolume create /var/cache/home-mnt/@
|
||||
#
|
||||
mkdir -p /media/pika-install-mount
|
||||
mount /dev/mapper/crypt_root /media/pika-install-mount/
|
||||
mount /dev/mapper/crypt_root /media/pika-install-mount/ -o subvol=@
|
||||
mkdir -p /media/pika-install-mount/home
|
||||
mount /dev/mapper/crypt_home /media/pika-install-mount/home
|
||||
mount /dev/mapper/crypt_home /media/pika-install-mount/home -o subvol=@
|
||||
mkdir -p /media/pika-install-mount/boot
|
||||
mount /dev/${S_DISK}2 /media/pika-install-mount/boot
|
||||
mkdir -p /media/pika-install-mount/boot/efi
|
||||
|
2
debian/changelog
vendored
2
debian/changelog
vendored
@ -1,4 +1,4 @@
|
||||
pika-installer-gtk4 (1.0.1-100pika4) pikauwu; urgency=low
|
||||
pika-installer-gtk4 (1.0.2-100pika1) pikauwu; urgency=low
|
||||
|
||||
* First release
|
||||
|
||||
|
@ -74,52 +74,27 @@ impl ObjectImpl for DriveMountRow {
|
||||
.width_request(300)
|
||||
.build();
|
||||
|
||||
let mountpoint_entry_adw_box = gtk::Box::builder()
|
||||
let mountpoint_entry_row = gtk::Entry::builder()
|
||||
.placeholder_text(t!("title_mountpoint"))
|
||||
.hexpand(true)
|
||||
.valign(gtk::Align::Start)
|
||||
.homogeneous(true)
|
||||
.build();
|
||||
|
||||
let mountpoint_entry_adw_listbox = gtk::ListBox::builder()
|
||||
.margin_top(5)
|
||||
.vexpand(true)
|
||||
.margin_bottom(5)
|
||||
.hexpand(true)
|
||||
.valign(gtk::Align::Start)
|
||||
.build();
|
||||
mountpoint_entry_adw_listbox.add_css_class("boxed-list");
|
||||
|
||||
let mountpoint_entry_row = adw::EntryRow::builder()
|
||||
.title(t!("title_mountpoint"))
|
||||
.hexpand(true)
|
||||
.valign(gtk::Align::Start)
|
||||
.margin_top(5)
|
||||
.width_request(300)
|
||||
.build();
|
||||
|
||||
let mountopt_entry_adw_box = gtk::Box::builder()
|
||||
let mountopt_entry_row = gtk::Entry::builder()
|
||||
.placeholder_text(t!("title_mountopt"))
|
||||
.hexpand(true)
|
||||
.valign(gtk::Align::Start)
|
||||
.homogeneous(true)
|
||||
.build();
|
||||
|
||||
let mountopt_entry_adw_listbox = gtk::ListBox::builder()
|
||||
.margin_top(5)
|
||||
.vexpand(true)
|
||||
.margin_start(10)
|
||||
.margin_bottom(5)
|
||||
.margin_start(5)
|
||||
.hexpand(true)
|
||||
.valign(gtk::Align::Start)
|
||||
.build();
|
||||
mountopt_entry_adw_listbox.add_css_class("boxed-list");
|
||||
|
||||
let mountopt_entry_row = adw::EntryRow::builder()
|
||||
.title(t!("title_mountopt"))
|
||||
.hexpand(true)
|
||||
.valign(gtk::Align::Start)
|
||||
.margin_top(5)
|
||||
.width_request(300)
|
||||
.build();
|
||||
|
||||
let partition_row_delete_button = gtk::Button::builder()
|
||||
.margin_end(0)
|
||||
.margin_start(5)
|
||||
.margin_end(5)
|
||||
.margin_top(5)
|
||||
.margin_bottom(5)
|
||||
.width_request(53)
|
||||
@ -136,18 +111,14 @@ impl ObjectImpl for DriveMountRow {
|
||||
partition_row_expander_adw_listbox.append(&partition_row_expander);
|
||||
action_row_content_box.append(&partition_row_expander_adw_listbox);
|
||||
|
||||
mountpoint_entry_adw_listbox.append(&mountpoint_entry_row);
|
||||
mountpoint_entry_adw_box.append(&mountpoint_entry_adw_listbox);
|
||||
action_row_content_box.append(&mountpoint_entry_adw_box);
|
||||
action_row_content_box.append(&mountpoint_entry_row);
|
||||
|
||||
mountopt_entry_adw_listbox.append(&mountopt_entry_row);
|
||||
mountopt_entry_adw_box.append(&mountopt_entry_adw_listbox);
|
||||
action_row_content_box.append(&mountopt_entry_adw_box);
|
||||
|
||||
action_row_content_box.append(&partition_row_delete_button);
|
||||
action_row_content_box.append(&mountopt_entry_row);
|
||||
|
||||
obj.add_prefix(&action_row_content_box);
|
||||
|
||||
obj.add_suffix(&partition_row_delete_button);
|
||||
|
||||
// Bind label to number
|
||||
// `SYNC_CREATE` ensures that the label will be immediately set
|
||||
let obj = self.obj();
|
||||
|
Loading…
Reference in New Issue
Block a user