From owner-freebsd-questions@freebsd.org Fri Jan 18 20:55:40 2019 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D4E321482002 for ; Fri, 18 Jan 2019 20:55:39 +0000 (UTC) (envelope-from j.maxuel@gmail.com) Received: from mail-io1-xd43.google.com (mail-io1-xd43.google.com [IPv6:2607:f8b0:4864:20::d43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DA70E73113 for ; Fri, 18 Jan 2019 20:55:38 +0000 (UTC) (envelope-from j.maxuel@gmail.com) Received: by mail-io1-xd43.google.com with SMTP id t24so11913382ioi.0 for ; Fri, 18 Jan 2019 12:55:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:subject:from:to:cc:date:in-reply-to:references :mime-version:content-transfer-encoding; bh=9Wtuthk8UK/aeTNrNCavlSbLMOGLF7aquHN24RxNbPs=; b=A7dVlbP5qSjPmfinF9aSG6I6OPWVBx2drj8ftlco82kXEX74l+IpbPdPUZMNOhCTDk MbSGeCgkykNY5dvzjymDQ4Uk6/WXY2yrB1u7lhWrjeoWzWWPdMmy9mHBHSVKVBO8gaXZ pS5LeEBZ858GH4RFG6cPXvnJbni9Wp8m7t1fvJ65RTEn/H7GoptEu2JXowXZXGANJBhB CRgbc/w/WO3DKnEnBr9FauNI0Bk9gpPeLKhP0As5fh74tCtTlpA7vP2vljzQtkQy3Bip q5GSCJKWDqiwA75uqx2Fkx81cj51z04a1nZlTSmlgwifCMMoJKvy4GcNeMPx72nHeyGm ejDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=9Wtuthk8UK/aeTNrNCavlSbLMOGLF7aquHN24RxNbPs=; b=A6fbyJ8Tem7EAWD2ONNcDpS3QWOKvRbun0ac91ioZ2nB37ohMARtR4Foc6x6NE1laW oxsyLaK7tkHR2KUEnIVNlg11EooE7a26AEFYMwjDcWkGF8tZb3sJhzDnYEZq1CmaDkeT Drl3EYni3NLWGH2qIEMZuKiYUMprNBPRbx0eyJA3VR9UjdCxQGI7flkBtDLozRLFf3RG +IwC+U0nY4qm+9nfaGkzioG5MSWjG+zVNrrOiDVG9WXKK+z2/ec6N6Netrwie32ZPuXt NtWERtZ+vE1n3fI17hd2Ab26+HFIskCdaOB81lB8ZC0paxtEasTUYcmh+wjZVCuFcrSB Wn9A== X-Gm-Message-State: AJcUukdrZkWcaaNPI6zJGy9QQB8q2hRn19uu5ap/qcRay1kTQ8aHkt49 47kEe9p71+in/kKQ6B7gxzMNKGtv X-Google-Smtp-Source: ALg8bN5VEcA0EF0qwRt9nDe95zlL6+BFmAQOpsx6ZFf9weFn0R3oUUy042dYXBheD0FLdTjrQf6zfQ== X-Received: by 2002:a6b:acc5:: with SMTP id v188mr10826094ioe.20.1547844938121; Fri, 18 Jan 2019 12:55:38 -0800 (PST) Received: from cybaryme (cbl-45-2-195-179.yhz.frontiernetworks.ca. [45.2.195.179]) by smtp.googlemail.com with ESMTPSA id o16sm2648549ito.19.2019.01.18.12.55.36 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 18 Jan 2019 12:55:37 -0800 (PST) Message-ID: <1547844935.2361.1.camel@gmail.com> Subject: Re: FreeBSD Installer not recognizing existing partition tables From: Joel Maxuel To: Polytropon Cc: freebsd-questions@freebsd.org Date: Fri, 18 Jan 2019 16:55:35 -0400 In-Reply-To: <20190118121130.81080d2b.freebsd@edvax.de> References: <1547790911.2471.3.camel@gmail.com> <20190118121130.81080d2b.freebsd@edvax.de> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6-1+deb9u1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DA70E73113 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=A7dVlbP5; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of jmaxuel@gmail.com designates 2607:f8b0:4864:20::d43 as permitted sender) smtp.mailfrom=jmaxuel@gmail.com X-Spamd-Result: default: False [-3.88 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; MV_CASE(0.50)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; NEURAL_HAM_SHORT(-0.99)[-0.991,0]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[3.4.d.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; IP_SCORE(-0.37)[ip: (2.40), ipnet: 2607:f8b0::/32(-2.37), asn: 15169(-1.83), country: US(-0.08)] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 20:55:40 -0000 On Fri, 2019-01-18 at 12:11 +0100, Polytropon wrote: > On Fri, 18 Jan 2019 01:55:11 -0400, Joel Maxuel wrote: > > Looking to set up FreeBSD as part of a dual-boot with Debian > > Stretch > > (already installed).  The drives I will be using includes an SSD > > (ada0/sda) for rootfs and an HDD (ada1/sdb) for swap and /home. > > Such kinds of setting are possible. > > > > > When I ran the FreeBSD installer, everything went fine until I got > > to > > partitioning - I chose the semi-manual option, and only ada0 & ada1 > > appeared - no existing partitions below. > > > > dmesg revealed: > > > > ada0 at ahcich0 bus 0 scbus0 target 0 lun 0 > > ... > > ada0: Command Queueing enabled > > ada0: 262321MB (537234768 512 byte sectors) > > ada1 at ahcich1 bus 0 scbus1 target 0 lun 0 > > ... > > ada1: Command Queueing enabled > > ada1: 953869MB (1953525168 512 byte sectors) > > ada1: quirks=0x1<4k> > > GEOM_PART: integrity check failed (ada0, BSD) > > GEOM_PART: integrity check failed (ada1, BSD) > > That is correct so far - two physical devices. > So the GEOM_PART fail (with the wrong table type) is normal? Double checking that because trouble threads I have looked at have come up with this error before, but not the mismatched partition table identity (from what I have seen). > > > The parted details (I had pre-made the partitions for FreeBSD): > > You should not pre-make anything for FreeBSD, just supply > unused disk space. The installer will create the required > partitions on its own. Experience tells us to leave the > installation tasks to the installer of the OS we want to > install. ;-) > FWIW, initially I didn't, but yeah, that "free space" was inside extended partition(s) - good point you made nonetheless. > > > ~> sudo parted /dev/sda unit s print > > Model: ATA Crucial_CT275MX3 (scsi) > > Disk /dev/sda: 537234768s > > Sector size (logical/physical): 512B/512B > > Partition Table: msdos > > Disk Flags:  > > > > Number  Start       End         Size        Type      File > > system  Flags > >  1      2048s       117229567s  117227520s  primary   ext4          > > boot > >  2      117229568s  537233407s  420003840s  extended > >  5      117231616s  419311615s  302080000s  logical   ext4 > >  6      419313664s  419315711s  2048s       logical   freebsd-ufs > >  7      419317760s  537233407s  117915648s  logical > > And this reveals your problem: > > Within the MBR partitioning scheme (as opposed to GPT which > doesn't require any further discussion here), FreeBSD needs > to be installed into a slice. A slice is a DOS primary (!) > partition which the installer cannot allocate here - disk > space insufficient. > > FreeBSD cannot be installed into a logical drive inside a > DOS extended partition, which is what you're trying to do. > > If you free up disk space, the installer - in "MBR mode" - > will create a slice (another DOS primary partition), and > inside this slice, will create partitions / labels. > > Example: > > /dev/ada0s1 -> ext4 > (extended and logicals omitted) > /dev/ada0s2 -> FreeBSD slice > /dev/ada0s2a -> FreeBSD boot partition (or "everything") > /dev/ada0s2b -> FreeBSD swap partition > > Depending on how you want to set the system up, you will > at least need ada0s2 with ada0s2a; everything else is optional > or can be located elsewhere. > > > Same problem here: No free disk space, and only a logical > drive within a DOS extended partition which FreeBSD cannot > natively use, at least not for booting. > > It _might_ be possible to initialize this one with newfs > manually, and use it as /home (with "newfs" command and > maybe "tunefs" if needed). The corresponding /dev/ada1s > will be a mystery for now. :-) I suppose here is why I am replying as such - /dev (in the FreeBSD installer environment) is not splitting out ada0 and ada1 into their partition nodes. As mentioned before, `gpart list` (my mistake for quoting `gpart show` earlier) returns nothing, and with the added `-a` switch, the only returned data is related to the optical drive. > Sorry, I have never been using heavy DOS partitioning in > combination with FreeBSD, and even for dual-booting systems, > I've only been using primary partitions. I never needed > more than 4 "drive letters"... :-) > Understood. > Sidenote: > > For /home, if I understood you correctly, you don't even > need to add a label to the slice. Let's say, /dev/ada1s2 > will be the DOS primary partition on the 2nd disk where > you want to place /home. You now _could_ add a 'd' label > ('a' reserved for boot partition, 'b' for swap, and 'c' > for "the whole thing, whatever it is"), and then run > "newfs /dev/ada1s2d" on it. That's not needed, you can > "newfs /dev/ada1s2" as well, and then use /dev/ada1s2 > for the /etc/fstab entry. If you wanted to use the entire > disk as "FreeBSD data" (i. e., not to boot from), you > could use "newfs /dev/ada1" to initialize it. This approach, > not using any partitioning at all, is called "dedicated", > because only FreeBSD can use it. The omission of partitioning > information will make it unusable for other operating systems, > even if they have UFS file system support. > > However, if you use the typical FreeBSD partitioning approach, > you should get things up and running without further problems. > > > > > `gpart show` returns nothing, and because the GEOM error > > automatically > > assumes the partition tables are BSD when they are really MBR > > (msdos), > > I don't believe the thread I found will be of assistance: > > > > https://www.mail-archive.com/freebsd-geom@freebsd.org/msg01424.html > > > > ...nor would I want to really risk blowing everything away (even > > with > > backups) for the possibility that my partition tables have gone > > weird > > over the years. > > Try to remove the logical drives you prepared. See if the > installer picks up the free disk space. You have sufficient > DOS primary partitions left (you only need 1), that should > be okay. The installer seems to be a little confused here, > don't make it harder for it than it needs to be. :-) > To add some detail as to what the partition editor (continues to) read back (in case this jars an idea for someone): ada0 256GB ada1 932GB IIRC, if the partitioner considered the drives as initialized, a third column with "MBR" would be present. Instead, it seems that the partitioner considered the drives as uninitialized or corrupt? > > > AHCI is turned on in my BIOS, but I am wondering if due to my other > > BIOS settings (noted above; IME disabled as well as it can be) if > > that > > is making FreeBSD expect something different from the controller > > than > > what is really happening.  I feel it is going to be something silly > > such as a slightly different process for non-UEFI. > > I don't think so. The drives seem to be detected correctly > without any errors. It's just the confusing partitioning. > With unused disk space, things should work better. > I did grep dmesg against GEOM as well, and there are two extra GEOM_PART errors for the drive UUID's this time, instead of just the /dev nodes. I suppose I could check for different kernel modes - there may be an option at the cd-loader that covers this.   Thanks for the tips thus far.