Class: Sgdisk::Zfs

Inherits:
Root
  • Object
show all
Defined in:
lib/sgdisk.rb

Instance Method Summary collapse

Methods inherited from Root

#initialize

Constructor Details

This class inherits a constructor from Sgdisk::Root

Instance Method Details

#add_zcacheObject



154
155
156
157
158
# File 'lib/sgdisk.rb', line 154

def add_zcache
  @zcache || return

  partition @zcache, @zcache_code, '0:0'
end

#add_zlogObject



148
149
150
151
152
# File 'lib/sgdisk.rb', line 148

def add_zlog
  @zlog || return

  partition @zlog, @zlog_code, '0:+4G'
end

#load_codesObject



126
127
128
129
130
131
132
133
# File 'lib/sgdisk.rb', line 126

def load_codes
  super
  @boot_code = 'be00'
  @root_code = 'bf00'
  @home_code = 'bf05'
  @zlog_code = 'bf07'
  @zcache_code = 'bf08'
end

#make_bootObject



135
136
137
138
139
# File 'lib/sgdisk.rb', line 135

def make_boot
  @boot || return

  partition @boot, @boot_code, '0:+2G'
end

#make_swapObject



141
142
143
144
145
146
# File 'lib/sgdisk.rb', line 141

def make_swap
  mem = Getch::Helpers.get_memory
  partition @swap, @swap_code, "0:+#{mem}"
  add_zlog
  add_zcache
end